Yes you can (from laravel site)
Route::group(array('prefix' => 'admin'), function()
{
Route::get('user', function()
{
//
});
});
Read the documentation about Route Prefixing and this answer too.
سؤال
Can i do something like Symfony to associate a route to a package? So every route on my routes.php admin package are prefixed with '/admin/'?
Because actually i can put a route on my main routes.php like '/admin' and i can put the same on my package routes without knowing that on my main routes this route is already in use.
My current package routes.php is something like this:
Route::get('/admin', 'MyVendor\administration\AdminController@test');
But what happens if i put the same '/admin' on the main routes? i dont like this approach.
Sorry for my English, i hope you understand me.
Thank you
المحلول
Yes you can (from laravel site)
Route::group(array('prefix' => 'admin'), function()
{
Route::get('user', function()
{
//
});
});
Read the documentation about Route Prefixing and this answer too.