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;
        $checkrole = explode(',', $role);
        if (in_array('superadmin', $checkrole)) {
            return redirect('admin');
        } else {
            return redirect('/');
        }
        return view('frontend.homepage.home');
    }
public function index ( ) { $ role = Auth :: user ( ) -> role ; $ checkrole = explode ( ',' , $ role ) ; if ( in_array ( 'superadmin' , $ checkrole ) ) { return redirect ( 'admin' ) ; } else { return redirect ( '/' ) ; } return view ( 'frontend.homepage.home' ) ; }
Show the application dashboard.
Show the application dashboard .