app/Containers/Plot/Data/Criterias/PlotsByUserCriteria.php
/**
     * @param $model
     * @param PrettusRepositoryInterface $repository
     * @return Collection
     */
@param $model
@param PrettusRepositoryInterface $repository
@return Collection
@param $model @param PrettusRepositoryInterface $repository @return Collection
public function apply($model, PrettusRepositoryInterface $repository)
    {
        $farmer = $this->user->farmer;
        if ($farmer) return $model->where('farmer_id', $farmer->id);
        else return null;
    }
public function apply ( $ model , PrettusRepositoryInterface $ repository ) { $ farmer = $ this -> user -> farmer ; if ( $ farmer ) return $ model -> where ( 'farmer_id' , $ farmer -> id ) ; else return null ; }
@param $model
 @param PrettusRepositoryInterface $repository
 @return Collection
@param $model @param PrettusRepositoryInterface $repository @return Collection