Issues (232)

app/Http/Controllers/FightController.php (1 issue)

1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Grade;
6
use App\Tournament;
7
use Illuminate\Http\Request;
8
9
class FightController extends Controller
10
{
11
    /**
12
     * Display a listing of the fights.
13
     *
14
     * @return \Illuminate\Http\Response
15
     */
16
    public function index(Request $request)
17
    {
18
        $grades = Grade::getAllPlucked();
19
        $tournament = Tournament::with(['championships.firstRoundFights' => function ($query) {
20
            $query->with(['competitor1.user', 'competitor2.user', 'team1', 'team2']);
21
        }])->where('slug', $request->tournament)
22
            ->first();
23
        return view('fights.index', compact('tournament', 'grades'));
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('fights.inde...tournament', 'grades')) returns the type Illuminate\Contracts\Vie...ry|Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
24
25
    }
26
}
27