app/Repositories/Criteria/BySymbolCriteria.php
/**
	 * Apply criteria in query repository
	 *
	 * @param QueryBuilder|Model $model
	 * @param RepositoryInterface $repository
	 *
	 * @return mixed
	 */
Apply criteria in query repository
@param QueryBuilder|Model $model
@param RepositoryInterface $repository

@return mixed
Apply criteria in query repository @param QueryBuilder|Model $model @param RepositoryInterface $repository @return mixed
public function apply($model, RepositoryInterface $repository)
	{
		$symbols = $this->symbols;
		if($this->joinValuta) {
			return $model->join('valuta', 'valuta_id', '=', 'valuta.id')
				->when(!empty($symbols), function ($query) use ($symbols) {
					$query->whereIn('valuta.symbol', $symbols);
				});
		} else {
			return $model->whereIn('valuta.symbol', $symbols);
		}
	}
public function apply ( $ model , RepositoryInterface $ repository ) { $ symbols = $ this -> symbols ; if ( $ this -> joinValuta ) { return $ model -> join ( 'valuta' , 'valuta_id' , '=' , 'valuta.id' ) -> when ( ! empty ( $ symbols ) , function ( $ query ) use ( $ symbols ) { $ query -> whereIn ( 'valuta.symbol' , $ symbols ) ; } ) ; } else { return $ model -> whereIn ( 'valuta.symbol' , $ symbols ) ; } }
Apply criteria in query repository
 @param QueryBuilder|Model $model
 @param RepositoryInterface $repository
Apply criteria in query repository @param QueryBuilder|Model $model @param RepositoryInterface $repository