v2 first commit
This commit is contained in:
35
app/Jobs/Auth/DeleteRole.php
Normal file
35
app/Jobs/Auth/DeleteRole.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Auth;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use Artisan;
|
||||
|
||||
class DeleteRole extends Job
|
||||
{
|
||||
protected $role;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $role
|
||||
*/
|
||||
public function __construct($role)
|
||||
{
|
||||
$this->role = $role;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->role->delete();
|
||||
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user