akaunting/app/Jobs/Auth/DeletePermission.php

35 lines
542 B
PHP
Raw Normal View History

2019-11-16 10:21:14 +03:00
<?php
namespace App\Jobs\Auth;
use App\Abstracts\Job;
class DeletePermission extends Job
{
protected $permission;
/**
* Create a new job instance.
*
* @param $permission
*/
public function __construct($permission)
{
$this->permission = $permission;
}
/**
* Execute the job.
*
2020-03-28 22:50:06 +03:00
* @return boolean|Exception
2019-11-16 10:21:14 +03:00
*/
public function handle()
{
2020-06-26 13:40:19 +03:00
\DB::transaction(function () {
$this->permission->delete();
});
2019-11-16 10:21:14 +03:00
return true;
}
}