for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Bedard\Shop\Console;
use Bedard\Shop\Models\Cart;
use Illuminate\Console\Command;
use Lang;
class Abandon extends Command
{
/**
* @var string The console command name.
*/
protected $name = 'shop:abandon';
* @var string The console command description.
protected $description;
* Constructor.
*
* @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()
$this->description = Lang::get('bedard.shop::lang.console.abandon.description');
parent::__construct();
}
* Execute the console command.
public function fire()
Cart::processAbandoned();
$this->output->writeln('<info>'.Lang::get('bedard.shop::lang.console.abandon.success').'</info>');
Adding a
@returnannotation 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.