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()
    {
        $role=auth()->user()->role;
        if ($role=='admin'){
            return view('Admin.index');
        }
        else{
            abort(403);
        }
    }
public function index ( ) { $ role = auth ( ) -> user ( ) -> role ; if ( $ role == 'admin' ) { return view ( 'Admin.index' ) ; } else { abort ( 403 ) ; } }
Show the application dashboard.
Show the application dashboard .