dimanche 26 décembre 2021

How to use old Laravel routing style in Laravel 8

I just installed Laravel 8 and in this version, I have to type my routes like this:

Route::get('/admin/panel', [App\Http\Controllers\Admin\PanelController::class, 'index']);

But I got used to Laravel 5 routes which looked like this:

Route::namespace('Admin')->prefix('admin')->group(function () {
    Route::get('/panel', 'Admin/PanelController@index');
});

So how can I use this Laravel 5 routing inside Laravel 8 version?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3yYPY8s
via IFTTT

Aucun commentaire:

Enregistrer un commentaire