app/Http/Controllers/Backsite/HospitalPatientController.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()
    {
        abort_if(Gate::denies('hospital_patient_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');
        $hospital_patient = User::whereHas('detail_user', function ($query) {
                                    return $query->where('type_user_id', 3);
                                })->orderBy('created_at', 'desc')->get();
        return view('pages.backsite.operational.hospital-patient.index', compact('hospital_patient'));
    }
public function index ( ) { abort_if ( Gate :: denies ( 'hospital_patient_access' ) , Response :: HTTP_FORBIDDEN , '403 Forbidden' ) ; $ hospital_patient = User :: whereHas ( 'detail_user' , function ( $ query ) { return $ query -> where ( 'type_user_id' , 3 ) ; } ) -> orderBy ( 'created_at' , 'desc' ) -> get ( ) ; return view ( 'pages.backsite.operational.hospital-patient.index' , compact ( 'hospital_patient' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .