multiple route file instead of one main route file in laravel 5

前端 未结 9 1114
广开言路
广开言路 2020-12-15 12:58

I am a novice in web developing with Laravel 5. I installed asGgardCMS and After seeing asgardCms codes, I found that there is nothing codes in app/Http/route.php file and r

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 13:04

    You can load custom route files within a Service Provider. AsgardCMS is doing it the same way, see this method in the Core RoutingServiceProvider that loads the backend routes:

    https://github.com/AsgardCms/Core/blob/master/Providers/RoutingServiceProvider.php#L77

    The Laravel docs provide a simple example in the package development section:

    http://laravel.com/docs/5.1/packages#routing

提交回复
热议问题