akaunting/app/Jobs/Auth/CreatePermission.php
2021-09-06 11:53:57 +03:00

20 lines
393 B
PHP

<?php
namespace App\Jobs\Auth;
use App\Abstracts\Job;
use App\Interfaces\Job\ShouldCreate;
use App\Models\Auth\Permission;
class CreatePermission extends Job implements ShouldCreate
{
public function handle(): Permission
{
\DB::transaction(function () {
$this->model = Permission::create($this->request->all());
});
return $this->model;
}
}