for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Clarkeash\Doorman\Commands;
use Illuminate\Console\Command;
use Clarkeash\Doorman\Models\Invite;
class CleanupCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $signature = 'doorman:cleanup';
* The console command description.
protected $description = 'Remove expired invites from the database.';
* 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()
$useless = Invite::useless()->count();
Invite::useless()->delete();
$this->info('Successfully deleted '.$useless.' expired invites from the database.');
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.