Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public function boot(){
  2. $modules = config("modules");
  3. while (list(,$modulo) = each($modules)) {
  4. if(is_dir(__DIR__.'/'.$modulo)) {
  5. $folders = array_diff(scandir(__DIR__.'/'.$modulo), ['.', '..']);
  6. while (list(,$module) = each($folders)) {
  7. if(file_exists(__DIR__.'/'.$modulo.'/routes.php')) {
  8. include __DIR__.'/'.$modulo.'/routes.php';
  9. }
  10. if(is_dir(__DIR__.'/'.$modulo.'/Views')) {
  11. $this->loadViewsFrom(__DIR__.'/'.$modulo.'/Views', $modulo);
  12. }
  13. }
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement