app/Repositories/Criteria/FilledQuantityCriteria.php
/**
	 * Apply criteria in query repository
	 *
	 * @param                     $model
	 * @param RepositoryInterface $repository
	 *
	 * @return mixed
	 */
Apply criteria in query repository
@param                     $model
@param RepositoryInterface $repository

@return mixed
Apply criteria in query repository @param $model @param RepositoryInterface $repository @return mixed
public function apply($model, RepositoryInterface $repository)
	{
		return $this->applyJoins($model, $repository)
			->addSelect(\DB::raw('orders.*, COALESCE(SUM(order_fills.quantity),0) as filled_qty'))
			->groupBy('orders.id');
	}
public function apply ( $ model , RepositoryInterface $ repository ) { return $ this -> applyJoins ( $ model , $ repository ) -> addSelect ( \ DB :: raw ( 'orders.*, COALESCE(SUM(order_fills.quantity),0) as filled_qty' ) ) -> groupBy ( 'orders.id' ) ; }
Apply criteria in query repository
 @param                     $model
 @param RepositoryInterface $repository
Apply criteria in query repository @param $model @param RepositoryInterface $repository