29 lines
581 B
PHP
29 lines
581 B
PHP
<?php
|
|
|
|
namespace App\Services\Admin;
|
|
|
|
use App\Models\Oldmen;
|
|
|
|
/**
|
|
* @method Oldmen getModel()
|
|
* @method Oldmen|\Illuminate\Database\Query\Builder query()
|
|
*/
|
|
class LiveInService extends OldmenService
|
|
{
|
|
public function listQuery()
|
|
{
|
|
$filter = $this->getModelFilter();
|
|
|
|
$query = $this->query();
|
|
if($this->withRelationships){
|
|
$query->with($this->withRelationships);
|
|
}
|
|
|
|
if ($filter) {
|
|
$query->filter(request()->input(), $filter)->where('live_in', Oldmen::STATUS_LIVE);
|
|
}
|
|
|
|
return $query;
|
|
}
|
|
}
|