Code cleanup.

This commit is contained in:
James Cole
2014-09-21 16:22:18 +02:00
parent 5dfc04e777
commit e892b69a96
22 changed files with 21 additions and 534 deletions

View File

@@ -129,19 +129,6 @@ class EloquentLimitRepository implements LimitRepositoryInterface
return true;
}
/**
* @param $limitId
*
* @return mixed
*/
public function find($limitId)
{
return \Limit::with('limitrepetitions')->where('limits.id', $limitId)->leftJoin(
'components', 'components.id', '=', 'limits.component_id'
)
->where('components.user_id', $this->_user->id)->first(['limits.*']);
}
public function findByBudgetAndDate(\Budget $budget, Carbon $date)
{
return \Limit::whereComponentId($budget->id)->where('startdate', $date->format('Y-m-d'))->first();