Laravel - Routing
Which of the following is the correct syntax to define a route group with the prefix
admin using Route::prefix() in Laravel?admin using Route::prefix() in Laravel?Route::prefix('admin')->group(function () { ... });.Route::group(['prefix' => 'admin'], function () { /* routes */ }); uses group() with array instead of prefix(). Route::prefix('admin', function () { /* routes */ }); incorrectly passes closure as second argument to prefix(). Route::group('admin', function () { /* routes */ }); passes string directly to group().15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions