PHP Snippet 1:
Route::resource('articles', ArticleController::class);
PHP Snippet 2:
Route::prefix('admin')->group(function () {
Route::get('/admin/panel', [PanelController::class, 'index']);
Route::resource('articles', ArticleController::class);
});
PHP Snippet 3:
use App\Http\Controllers\Admin\PanelController;
use App\Http\Controllers\Admin\ArticleController;
Route::namespace('Admin')->prefix('admin')->group(function(){
Route::get('/admin/panel', [PanelController::class, 'index']);
Route::resource('articles', ArticleController::class);
});
PHP Snippet 4:
use App\Http\Controllers\Admin\PanelController;
Route::namespace('Admin')->prefix('admin')->group(function(){
Route::get('/admin/panel', [PanelController::class, 'index']);
Route::resource('articles', 'App\Http\Controllers\Admin\ArticleController');
});