Created
February 16, 2015 05:49
-
-
Save kivlor/e157b4b5f21f79aec5ee to your computer and use it in GitHub Desktop.
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 | |
use Illuminate\Console\Command; | |
class DebugCommand extends Command | |
{ | |
/** | |
* The console command name. | |
* | |
* @var string | |
*/ | |
protected $name = 'debug'; | |
/** | |
* The console command description. | |
* | |
* @var string | |
*/ | |
protected $description = "Put the application into debug mode"; | |
/** | |
* Execute the console command. | |
* | |
* @return void | |
*/ | |
public function fire() | |
{ | |
if(file_exists($this->laravel['config']['app.manifest'].'/debug')) | |
{ | |
@unlink($this->laravel['config']['app.manifest'].'/debug'); | |
$this->info('Application is no longer in debug mode.'); | |
} | |
else | |
{ | |
touch($this->laravel['config']['app.manifest'].'/debug'); | |
$this->comment('Application is now in debug mode.'); | |
} | |
} | |
} | |
// EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment