for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers;
use App\Tournament;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\View;
class DashboardController extends Controller
{
/**
* Display a listing of the resource.
*
* @return View
*/
public function index()
$openTournaments = Tournament::with('owner')
->whereHas('owner', function ($query) {
$query->where('country_id', Auth::user()->country_id);
})
->where('type', config('constants.OPEN_TOURNAMENT'))
->where('dateFin', '>', Carbon::today()->toDateString())
->get();
return view('/dashboard', compact('openTournaments'));
return view('/dashboard'...act('openTournaments'))
Illuminate\Contracts\Vie...ry|Illuminate\View\View
Illuminate\Support\Facades\View
}