create permission crud

This commit is contained in:
Geriano
2022-07-17 11:00:11 +07:00
parent d8bd54b4cb
commit 10c1fa687a
7 changed files with 362 additions and 18 deletions

View File

@@ -15,21 +15,14 @@ use Inertia\Inertia;
|
*/
Route::get('/', function () {
return Inertia::render('Welcome', [
'canLogin' => Route::has('login'),
'canRegister' => Route::has('register'),
'laravelVersion' => Application::VERSION,
'phpVersion' => PHP_VERSION,
]);
});
Route::middleware([
'auth:sanctum',
config('jetstream.auth_session'),
'verified',
])->group(function () {
Route::get('/dashboard', function () {
Route::middleware(['auth:sanctum', config('jetstream.auth_session'), 'verified'])->group(function () {
Route::get('/', function () {
return Inertia::render('Dashboard');
})->name('dashboard');
});
Route::name('superuser.')->group(function () {
Route::resource('permission', App\Http\Controllers\Superuser\PermissionController::class)->only([
'index', 'store', 'update', 'destroy',
]);
});
});