for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Reallyli\AB\Commands;
use DB;
use Config;
use Illuminate\Console\Command;
class FlushCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'ab:flush';
* The console command description.
protected $description = 'Clear all A/B testing data.';
* Create a new command instance.
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct()
parent::__construct();
}
* Execute the console command.
* @return mixed
public function handle()
$connection = Config::get('ab::connection');
DB::connection($connection)->table('experiments')->delete();
DB::connection($connection)->table('goals')->delete();
$this->call('ab:install');
$this->info('A/B testing data flushed.');
* Get the console command arguments.
* @return array
protected function getArguments()
return [];
* Get the console command options.
protected function getOptions()
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.