[input_key1, input_key2]]. * * @var array */ public $relations = []; public function apply($query) { return $query; } public function asset($assetId){ $asset = Asset::find($assetId); $assetIds=[]; if ($asset){ $assetIds = Asset::where('path','like',"%{$asset->path}%")->get('id'); } return $this->whereIn('asset_id',$assetIds); } public function status($status){ $projectIds = Project::where('status',$status)->get('id'); return $this->whereIn('project_id',$projectIds); } }