Last active
August 29, 2015 14:16
-
-
Save 2bj/1c074011e398e3b85c27 to your computer and use it in GitHub Desktop.
Laravel 5 DevelopmentServiceProvider for separate providers and aliases in different environments. Now you can install deps with --no-dev option in composer.
This file contains 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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
// Don't forget register App\Providers\DevelopmentServiceProvider in config/app.php | |
class DevelopmentServiceProvider extends ServiceProvider { | |
/** | |
* Register the application services. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
if ($this->app->isLocal()) | |
{ | |
$this->app->register('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider'); | |
$this->app->register('Clockwork\Support\Laravel\ClockworkServiceProvider'); | |
$this->app->register('Laracasts\Generators\GeneratorsServiceProvider'); | |
$this->app->alias('Clockwork', 'Clockwork\Support\Laravel\Facade'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment