mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 00:02:05 -04:00
67 lines
1.6 KiB
PHP
67 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Modules\StudioPlus\Http\Controllers\API;
|
|
|
|
use Illuminate\Contracts\Support\Renderable;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Routing\Controller;
|
|
use Modules\StudioPlus\Entities\StudioPlusChannel;
|
|
use Modules\StudioPlus\Entities\StudioPlusVideo;
|
|
|
|
class ChannelController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
* @return Renderable
|
|
*/
|
|
public function index(StudioPlusChannel $studioPlusChannel)
|
|
{
|
|
return view('studioplus::create');
|
|
}
|
|
|
|
public function show(Request $request, StudioPlusChannel $studioPlusChannel)
|
|
{
|
|
return $studioPlusChannel->load([
|
|
'user',
|
|
'studioPlusUser',
|
|
'videos' => function ($query) use ($request) {
|
|
$query->with(['thumbnail'])
|
|
->when($request->filled('short'), function ($query) use ($request) {
|
|
$query->where('is_short', $request->short);
|
|
});
|
|
}
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
* @param int $id
|
|
* @return Renderable
|
|
*/
|
|
public function edit($id)
|
|
{
|
|
return view('studioplus::edit');
|
|
}
|
|
|
|
/**
|
|
* Update the specified resource in storage.
|
|
* @param Request $request
|
|
* @param int $id
|
|
* @return Renderable
|
|
*/
|
|
public function update(Request $request, $id)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Remove the specified resource from storage.
|
|
* @param int $id
|
|
* @return Renderable
|
|
*/
|
|
public function destroy($id)
|
|
{
|
|
//
|
|
}
|
|
}
|