Shift with red gradient lettering
Loading navigation...

Class based routes

Premium
Laravel

Register routes using static ::class references instead of strings and remove any namespace prefixes from the RouteServiceProvider. This convention was adopted by default in Laravel 8. Running this task automatically runs the "actions to tuples" task as well.

Before

Route::resource('/post', 'PostController');

After

Route::resource('/post', PostController::class);

← Back to the Workbench Tasks