mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-10-08 12:13:01 -04:00
Initial commit
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user