From ad6613f75be49b7ed40fd7acb7adfd311164def0 Mon Sep 17 00:00:00 2001 From: abourtnik Date: Tue, 20 Feb 2024 15:37:41 +0100 Subject: [PATCH] fix: video policy --- routes/web.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 320d82d..b645954 100644 --- a/routes/web.php +++ b/routes/web.php @@ -203,8 +203,12 @@ ->name('unpin') ->can('unpin', 'video') ->missing(fn(Request $request) => abort(404, 'Video not found')); - Route::get('{video}/create', 'create')->name('create'); - Route::post('{video}/store', 'store')->name('store'); + Route::get('{video}/create', 'create') + ->name('create') + ->can('update', 'video'); + Route::post('{video}/store', 'store') + ->name('store') + ->can('update', 'video'); }); Route::resource('videos', VideoUserController::class)->except([