/** * Bootstrap the application events. * * @return void */ public function boot() { $this->package('frknikiz/laravel-quick-elfinder', "CustomElfinder"); $this->app->register('Barryvdh\\Elfinder\\ElfinderServiceProvider'); require __DIR__ . "../../../routes.php"; \Config::addNamespace('laravel-quick-elfinder', __DIR__ . "../../../config"); }
/** * Creating new services, namespaces and others. * * @return void */ protected function create($module) { $path = $this->path; \View::addNamespace($module, $path . $module . '/views'); \Config::addNamespace($module, $path . $module . '/config'); // create aliases for controllers and models $use_alias = \Config::get($module . '::app.alias'); if ($use_alias == TRUE) { $this->createAliases($module); } $modulePath = $path . $module; \ClassLoader::addDirectories(array($modulePath . '/commands', $modulePath . '/controllers', $modulePath . '/models', $modulePath . '/database/seeds')); }
/** * Register the service provider. * * @access public * @return void */ public function register() { \Config::addNamespace('fhferreira/gocardless-pro-laravel', app_path('config/packages/fhferreira/gocardless-pro-laravel')); $this->app->bindShared('gocardless-pro-laravel', function ($app) { $config = $app['config']->get('fhferreira/gocardless-pro-laravel::config'); $env = isset($config['environment']) ? $config['environment'] : null; $environment = \GoCardlessPro\Environment::SANDBOX; if ($env == 'live') { $environment = \GoCardlessPro\Environment::LIVE; } $access_token = isset($config['access_token']) ? $config['access_token'] : null; return new \GoCardlessPro\Client(array('access_token' => $access_token, 'environment' => $environment)); }); $this->app->alias('gocardless-pro-laravel', 'Fhferreira\\GoCardLess\\Facades\\GoCardLess'); }
/** * Called to enable package specific configuration */ public function registerConfigNamespace() { \Config::addNamespace($this->getPackageHandle(), $this->getPackagePath() . '/config'); }
<?php /* |-------------------------------------------------------------------------- | Register The Module Namespaces |-------------------------------------------------------------------------- | | Here is you can register the namespace for this module. | You may to edit this namespace if you want. | */ View::addNamespace('blog', __DIR__ . '/Resources/views/'); Lang::addNamespace('blog', __DIR__ . '/Resources/lang/'); Config::addNamespace('blog', __DIR__ . '/Config/'); /* |-------------------------------------------------------------------------- | Require Routes File. |-------------------------------------------------------------------------- | | Next, this module will load routes file. | */ require __DIR__ . '/Http/routes.php';
| Register The Module Class Loader |-------------------------------------------------------------------------- | | In addition to using Composer, you may use the Laravel class loader to | load your controllers and models. This is useful for keeping all of | your classes in the "global" namespace without Composer updating. | */ ClassLoader::addDirectories(array(__DIR__ . '/../commands', __DIR__ . '/../controllers', __DIR__ . '/../models', __DIR__ . '/../database/seeds')); /* |-------------------------------------------------------------------------- | Register The Module Namespaces |-------------------------------------------------------------------------- | | Here is you can register the namespace for this module. | You may to edit this namespace if you want. | */ View::addNamespace('usermanage', __DIR__ . '/../views/'); Lang::addNamespace('usermanage', __DIR__ . '/../lang/'); Config::addNamespace('usermanage', __DIR__ . '/../config/'); /* |-------------------------------------------------------------------------- | Require Module Filters and Routes file. |-------------------------------------------------------------------------- | | Next, this module will load filters and routes file. | */ require __DIR__ . '/../filters.php'; require __DIR__ . '/../routes.php';