for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers;
use App\Grade;
use App\Tournament;
use Illuminate\Http\Request;
class FightController extends Controller
{
/**
* Display a listing of the fights.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
$grades = Grade::getAllPlucked();
$tournament = Tournament::with(['championships.firstRoundFights' => function ($query) {
$query->with(['competitor1.user', 'competitor2.user', 'team1', 'team2']);
}])->where('slug', $request->tournament)
->first();
return view('fights.index', compact('tournament', 'grades'));
return view('fights.inde...tournament', 'grades'))
Illuminate\Contracts\Vie...ry|Illuminate\View\View
Illuminate\Http\Response
}