Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function boot(){
- $modules = config("modules");
- while (list(,$modulo) = each($modules)) {
- if(is_dir(__DIR__.'/'.$modulo)) {
- $folders = array_diff(scandir(__DIR__.'/'.$modulo), ['.', '..']);
- while (list(,$module) = each($folders)) {
- if(file_exists(__DIR__.'/'.$modulo.'/routes.php')) {
- include __DIR__.'/'.$modulo.'/routes.php';
- }
- if(is_dir(__DIR__.'/'.$modulo.'/Views')) {
- $this->loadViewsFrom(__DIR__.'/'.$modulo.'/Views', $modulo);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement