Created
March 11, 2015 07:17
-
-
Save ziyahan/f5214dec25feb353fcf4 to your computer and use it in GitHub Desktop.
ServiceProvider.php
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 App\Modules; | |
class ServiceProvider extends \Illuminate\Support\ServiceProvider | |
{ | |
public function boot() | |
{ | |
$modules = config("module.modules"); | |
while (list(,$module) = each($modules)) { | |
if(file_exists(__DIR__.'/'.$module.'/routes.php')) { | |
include __DIR__.'/'.$module.'/routes.php'; | |
} | |
if(is_dir(__DIR__.'/'.$module.'/Views')) { | |
$this->loadViewsFrom(__DIR__.'/'.$module.'/Views', $module); | |
} | |
} | |
} | |
public function register(){} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment