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();
        $kasir = Kasir::where('user_id', Auth::id())->first();
        $role = $user->getRoleNames();
        return view('menu.info', compact('user', 'kasir', 'role'));
    }
public function index ( ) { $ user = Auth :: user ( ) ; $ kasir = Kasir :: where ( 'user_id' , Auth :: id ( ) ) -> first ( ) ; $ role = $ user -> getRoleNames ( ) ; return view ( 'menu.info' , compact ( 'user' , 'kasir' , 'role' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .