From b6ffb8b3dfd9016b031f5351b5119b77cb1d91d4 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 29 Nov 2016 13:40:00 -0800 Subject: [PATCH] Protect edit route as well --- app/Http/routes.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index e06a5e96dc..9080e38f71 100755 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -499,8 +499,12 @@ Route::group([ 'prefix' => 'admin','middleware' => ['web','auth']], function () 'uses' => 'AssetMaintenancesController@getEdit' ]); + Route::post('{assetMaintenanceId}/edit', + [ 'as' => 'update/asset_maintenance.save', + 'middleware' => 'authorize:assets.edit', + 'uses' => 'AssetMaintenancesController@postEdit' + ]); - Route::post('{assetMaintenanceId}/edit', 'AssetMaintenancesController@postEdit'); Route::get( '{assetMaintenanceId}/delete', [ 'as' => 'delete/asset_maintenance', 'uses' => 'AssetMaintenancesController@getDelete' ]