A great thing has been added in Laravel 8.80, https://github.com/laravel/framework/pull/40276 which is the use of Route::controller() with Groups to shorten Route, so I want to share it with you so that you may use it in your next projects.
Route::controller(PlacementController::class)->prefix('placements')->as('placements.')->group(function () {
Route::get('', 'index')->name('index');
Route::get('/bills', 'bills')->name('bills');
});
Top comments (2)
Read Taylor's tweet about this. Interesting addition to avoid repetition.
Thank you for your comment. I wanted to share it so that the largest number of interested people can benefit as much as I did.