app/Http/Controllers/AdminBookingController.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()
    {
        if(!session()->has('member')) return response()->json(['message'=>'member not found.']);
        if(\Auth::user()->role != 99) return response()->json(['message'=>'permission denied']);
        return view('adminbooking.index' , ['user' => session()->get('member')]);
    }
public function index ( ) { if ( ! session ( ) -> has ( 'member' ) ) return response ( ) -> json ( [ 'message' => 'member not found.' ] ) ; if ( \ Auth :: user ( ) -> role != 99 ) return response ( ) -> json ( [ 'message' => 'permission denied' ] ) ; return view ( 'adminbooking.index' , [ 'user' => session ( ) -> get ( 'member' ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .