mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-09-13 00:45:09 -04:00
Updated to latest
This commit is contained in:
@@ -13,9 +13,12 @@ class StudioPlusVideoTypeController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$videoTypes = Cache::remember('videoTypes', 300, function() {
|
||||
return StudioPlusVideoType::where('active',1)->orderBy('order')->get();
|
||||
});
|
||||
|
||||
$query = StudioPlusVideoType::query()->with(['badge','jobCategory']);
|
||||
if ($request->has('active')) {
|
||||
$query = $query->where('active', $request->active);
|
||||
}
|
||||
$videoTypes = $query->orderBy('order')->get();
|
||||
|
||||
return StudioPlusVideoTypeResource::collection($videoTypes);
|
||||
}
|
||||
@@ -29,9 +32,9 @@ class StudioPlusVideoTypeController extends Controller
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
public function update(StudioPlusVideoTypeRequest $request, StudioPlusVideoType $videoType)
|
||||
public function update(Request $request, StudioPlusVideoType $videoType)
|
||||
{
|
||||
$videoType->update($request->validated());
|
||||
$videoType->update($request->all());
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user