| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 8 | public function index() |
|
| 18 | { |
||
| 19 | 8 | $openTournaments = Tournament::with('owner') |
|
| 20 | 8 | ->whereHas('owner', function ($query) { |
|
| 21 | 8 | $query->where('country_id', Auth::user()->country_id); |
|
| 22 | 8 | }) |
|
| 23 | 8 | ->where('type', config('constants.OPEN_TOURNAMENT')) |
|
| 24 | 8 | ->where('dateFin', '>', Carbon::today()->toDateString()) |
|
| 25 | 8 | ->get(); |
|
| 26 | 8 | return view('/dashboard', compact('openTournaments')); |
|
|
|
|||
| 27 | |||
| 31 |