Skip to content

Instantly share code, notes, and snippets.

@kivlor
Created February 16, 2015 05:49
Show Gist options
  • Save kivlor/e157b4b5f21f79aec5ee to your computer and use it in GitHub Desktop.
Save kivlor/e157b4b5f21f79aec5ee to your computer and use it in GitHub Desktop.
<?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