Accessing id on the interface Illuminate\Contracts\Auth\Authenticatable suggest that you code against a concrete implementation. How about adding an instanceof check?
Loading history...
25
return $next($request);
26
}
27
} elseif (isset($request->cid)) {
28
//contest privilege
29
$contestModel=new ContestModel();
30
if ($contestModel->judgeClearance($request->cid, Auth::user()->id)==3) {