More views and options for limits [skip ci]

This commit is contained in:
James Cole
2014-07-24 06:47:28 +02:00
parent 30553ed7a3
commit 36901359d0
13 changed files with 280 additions and 82 deletions

View File

@@ -14,7 +14,9 @@ class EloquentLimitRepository implements LimitRepositoryInterface
public function find($limitId)
{
return \Limit::with('limitrepetitions')->where('limits.id', $limitId)->leftJoin('components', 'components.id', '=', 'limits.component_id')
return \Limit::with('limitrepetitions')->where('limits.id', $limitId)->leftJoin(
'components', 'components.id', '=', 'limits.component_id'
)
->where('components.user_id', \Auth::user()->id)->first(['limits.*']);
}