Permalink
Browse files

added environment command.

  • Loading branch information...
taylorotwell committed Sep 30, 2013
1 parent 0a90bb9 commit 5c7ba12fda225a295ae96dbb7770f4859aa65330
@@ -0,0 +1,31 @@
<?php namespace Illuminate\Foundation\Console;
use Illuminate\Console\Command;
class ChangesCommand extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'env';
/**
* The console command description.
*
* @var string
*/
protected $description = "Display the current framework environment";
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
$this->line('<info>Current application environment:</info> <comment>'.$this->app['env'].'</comment>');
}
}
@@ -3,6 +3,7 @@
use Illuminate\Foundation\Artisan;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\Console\ChangesCommand;
use Illuminate\Foundation\Console\EnvironmentCommand;
class ArtisanServiceProvider extends ServiceProvider {
@@ -30,6 +31,11 @@ public function register()
return new ChangesCommand;
});
$this->app['command.environment'] = $this->app->share(function($app)
{
return new EnvironmentCommand;
});
$this->commands('command.changes');
}
@@ -40,7 +46,7 @@ public function register()
*/
public function provides()
{
return array('artisan', 'command.changes');
return array('artisan', 'command.changes', 'command.environment');
}
}

0 comments on commit 5c7ba12

Please sign in to comment.