27 lines
686 B
PHP
27 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Services\Admin;
|
|
|
|
use App\Models\RegionCategory;
|
|
use App\Filters\Admin\RegionCategoryFilter;
|
|
use Slowlyo\OwlAdmin\Services\AdminService;
|
|
|
|
/**
|
|
* @method RegionCategory getModel()
|
|
* @method RegionCategory|\Illuminate\Database\Query\Builder query()
|
|
*/
|
|
class RegionCategoryService extends AdminService
|
|
{
|
|
protected string $modelName = RegionCategory::class;
|
|
|
|
public function listQuery()
|
|
{
|
|
$model = $this->getModel();
|
|
|
|
return $this->query()
|
|
->with('parent')
|
|
->filter(request()->input(), RegionCategoryFilter::class)
|
|
->orderByDesc($model->getUpdatedAtColumn() ?? $model->getKeyName());
|
|
}
|
|
}
|