app/Http/Controllers/MedicineController.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()
    {
        $medicines = request()->user()->medicines;
        return response()->json([
            'medicines' => $medicines,
        ], 200);
    }
public function index ( ) { $ medicines = request ( ) -> user ( ) -> medicines ; return response ( ) -> json ( [ 'medicines' => $ medicines , ] , 200 ) ; }
Display a listing of the resource.
Display a listing of the resource .