handler($filters); } /** * @param Builder $query * @return Model * @throws ResourceNotFoundException */ public function getResults(Builder $query, array $param = []): Model { if(!$query->exists()){ $table = $query->getModel()->getTable(); if($table ==='job_results'){ throw new JobResourceNotFoundException('Unable to find any job based on the criteria provided'); } else{ throw new ResourceNotFoundException('Unable to find any record based on the criteria provided'); } } return $query->first(); } }