Last active
June 8, 2016 21:12
-
-
Save Mulkave/c1b2a181d56a03b9e0aefa20d2a81a9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Directory\Foundation\Providers; | |
use Illuminate\Routing\Router; | |
use Caffeinated\Modules\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider | |
{ | |
protected $serviceName = ''; | |
public function map(Router $router) | |
{ | |
$namespace = config('modules.namespace').$this->serviceName.'\Http\Controllers'; | |
$router->group(['namespace' => $namespace], function($router) | |
{ | |
$routesFile = config('modules.path').'/'.$this->serviceName.'/Http/routes.php'; | |
if (file_exists($routesFile)) { | |
require $routesFile; | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment