Reputation: 536
Hello everyone. Laravel uses this for user groups
Auth::routes();
I have a rout group For webmaster How to create a routes like the example above. As below:
َadmin::routes();
Upvotes: 0
Views: 119
Reputation: 179994
If you want to provide routes via a package, see https://laravel.com/docs/5.7/packages#routes.
public function boot()
{
$this->loadRoutesFrom(__DIR__.'/routes.php');
}
If you're just doing this for organization, I don't see what benefit you get - you'd be better off putting them in something like routes/admin.php
and loading that file in the app/Providers/RouteServiceProvider.php
file like the web/API routes are already.
Upvotes: 1