FIX: fix content dependency on categories
This commit is contained in:
@@ -7,8 +7,8 @@ Route::group(['namespace' => 'Contents'], function () {
|
||||
|
||||
// form for creating new static page
|
||||
Route::get('content/new/{module}', 'CreateNewContent@create')
|
||||
->name('content.new')
|
||||
->middleware(['can:create,module', 'can:create,' . \App\Models\Content\Content::class]);
|
||||
->name('content.new')// ->middleware(['can:create,module', 'can:create,' . \App\Models\Content\Content::class]);
|
||||
->middleware('can:create,' . \App\Models\Content\Content::class);
|
||||
|
||||
// form for editing existing static page
|
||||
Route::get('content/edit/{page}', 'EditContent@edit')
|
||||
@@ -18,7 +18,8 @@ Route::group(['namespace' => 'Contents'], function () {
|
||||
// post method for creating new static page
|
||||
Route::post('content/new/{module}', 'CreateNewContent@store')
|
||||
->name('content.newPost')
|
||||
->middleware('can:create,module');
|
||||
->middleware('can:create,' . \App\Models\Content\Content::class);
|
||||
// ->middleware('can:create,module');
|
||||
|
||||
// post method for creating new static page
|
||||
Route::post('content/edit/{page}', 'EditContent@update')
|
||||
@@ -46,7 +47,7 @@ Route::group(['namespace' => 'Contents'], function () {
|
||||
->middleware('can:viewHistory,page');
|
||||
|
||||
// history of changes for specified page
|
||||
Route::get('history/{revision}', 'History@getDiff')
|
||||
Route::get('history/diff/{revision}', 'History@getDiff')
|
||||
->name('history.diff')
|
||||
->middleware('can:viewHistory,page');
|
||||
->middleware('can:viewHistory,'.\App\Models\Content\Content::class);
|
||||
});
|
||||
Reference in New Issue
Block a user