add shipping rules
This commit is contained in:
@@ -2,14 +2,12 @@
|
||||
|
||||
namespace App\Repositories\Botanic;
|
||||
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
use App\Models\Botanic\Genre;
|
||||
use App\Exports\Botanic\GenresExport;
|
||||
use App\Models\Botanic\Genre;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
|
||||
class Genres
|
||||
{
|
||||
|
||||
public static function getOptions()
|
||||
{
|
||||
return Genre::get()->SortBy('name')->pluck('name', 'id')->toArray();
|
||||
@@ -28,6 +26,7 @@ class Genres
|
||||
public static function store($data)
|
||||
{
|
||||
$item = ($data['id'] ?? false) ? self::update($data) : self::create($data);
|
||||
|
||||
return $item->id;
|
||||
}
|
||||
|
||||
@@ -41,6 +40,7 @@ class Genres
|
||||
$id = $id ? $id : $data['id'];
|
||||
$model = self::get($id);
|
||||
$model->update($data);
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user