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()
    {
        $roles = Auth::user()->getRoleNames();
        if($roles[0] == 'admin'){
            return redirect()->route('categories.index');
        }else{
            return redirect()->route('template.home');
        }        
    }
public function index ( ) { $ roles = Auth :: user ( ) -> getRoleNames ( ) ; if ( $ roles [ 0 ] == 'admin' ) { return redirect ( ) -> route ( 'categories.index' ) ; } else { return redirect ( ) -> route ( 'template.home' ) ; } }
Show the application dashboard.
Show the application dashboard .