v2 first commit
This commit is contained in:
33
app/Jobs/Setting/CreateCategory.php
Normal file
33
app/Jobs/Setting/CreateCategory.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Setting;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Models\Setting\Category;
|
||||
|
||||
class CreateCategory extends Job
|
||||
{
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
$this->request = $this->getRequestInstance($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return Category
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$category = Category::create($this->request->all());
|
||||
|
||||
return $category;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user