app/Http/Controllers/AssetsController.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()
    {
        $assets = Asset::where('hospital_id',auth()->user()->hospital_id)->get();
        return $assets;
    }
public function index ( ) { $ assets = Asset :: where ( 'hospital_id' , auth ( ) -> user ( ) -> hospital_id ) -> get ( ) ; return $ assets ; }
Display a listing of the resource.
Display a listing of the resource .
// return response()->json(['content' => $assets,'state' => 200]);