FEATURE #2048: add basics of permissions management

This commit is contained in:
Michal Kváček
2017-08-10 23:18:53 +02:00
parent f702ba3a29
commit cccdbda543
18 changed files with 483 additions and 147 deletions
+4 -2
View File
@@ -6,11 +6,13 @@ Route::group(['namespace' => 'Contents'], function () {
// form for creating new static page
Route::get('content/new/{module}', 'CreateNewContent@create')
->name('content.new');
->name('content.new')
->middleware(['can:create,module', 'can:create,' . \App\Models\Content\Content::class]);
// form for editing existing static page
Route::get('content/edit/{page}', 'EditContent@edit')
->name('content.edit');
->name('content.edit')
->middleware('can:update,page');
// post method for creating new static page
Route::post('content/new/{module}', 'CreateNewContent@store')
+3
View File
@@ -0,0 +1,3 @@
<?php
Route::resource('permissions', 'Permissions');