laravelserverlaravel-routinglaravel-requestlaravel-response

Laravel: accessing url multiple time with different parameter returns wrong data


The view of my application post data to controller with a parameter in URL. The URL is like

   xxxx/admin/shipments/edit/50

It means I am editing the shipment having shipment_id = 50. but when user uses the application after certain time instead of respective shipment_id that is 50. It returns the data of other shipments such as 56, 51, 90 etc.

    public function routeShipmentsEdit($shipment_id){ 
    // Numeric Check
    If(is_numeric($shipment_id)){}

Solution

  • The reason was server caching. The page size was more than 4k therefore the server was caching it and was always returning the cached page. I managed to reduce the size of page and now its working fine.