protected function findModel()
    {
        $class = $this->model;
        $query = $class::query();

        foreach ($this->input as $key => $value) {
            $where = is_array($value) ? 'whereIn' : 'where';
            $query->$where($key, $value);
        }

        return $query->get();
    }
protected function findModel()
    {
        $class = $this->model;
        $query = $class::query();

        foreach ($this->input as $key => $value) {
            $where = is_array($value) ? 'whereIn' : 'where';
            $query->$where($key, $value);
        }

        return $query->get();
    }
protected function findModel ( ) { $ class = $ this -> model ; $ query = $ class :: query ( ) ; foreach ( $ this -> input as $ key => $ value ) { $ where = is_array ( $ value ) ? 'whereIn' : 'where' ; $ query -> $ where ( $ key , $ value ) ; } return $ query -> get ( ) ; }
Use the current input to find a record.

Apps can override this with their custom methods of finding based on criteria.

@return Illuminate\Database\Eloquent\Model
Use the current input to find a record .