app/Http/Controllers/UserController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $user = \Auth::user();
        if ($user->hasRole('analista') || $user->hasRole('supervisor')) {
            return redirect(url('/task'));
        } elseif ($user->hasRole('usuario')) {
            return redirect(url('/analyst/'.date('Y', strtotime('now')).'/'.date('m', strtotime('now'))));
        } else {
            return view('pages.home');
        }
    }
public function index ( ) { $ user = \ Auth :: user ( ) ; if ( $ user -> hasRole ( 'analista' ) || $ user -> hasRole ( 'supervisor' ) ) { return redirect ( url ( '/task' ) ) ; } elseif ( $ user -> hasRole ( 'usuario' ) ) { return redirect ( url ( '/analyst/' . date ( 'Y' , strtotime ( 'now' ) ) . '/' . date ( 'm' , strtotime ( 'now' ) ) ) ) ; } else { return view ( 'pages.home' ) ; } }
Display a listing of the resource.
Display a listing of the resource .