app/Http/Controllers/HomeController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index()
    {
        if (Auth::user()->role == "admin"){
            $panel = "Admin panel";
            return view('adminV',["panel" => $panel]);
        }else{
            $panel = "User panel";
            return view('home',["panel" => $panel]);
        }
    }
public function index ( ) { if ( Auth :: user ( ) -> role == " admin " ) { $ panel = " Admin panel " ; return view ( 'adminV' , [ " panel " => $ panel ] ) ; } else { $ panel = " User panel " ; return view ( 'home' , [ " panel " => $ panel ] ) ; } }
Show the application dashboard.
Show the application dashboard .
//dd(Auth::user()->role);