Routes

Delivery

Overview

This code defines routes related to delivery in a Laravel application. It includes a GET route for health checks (delivery/_ping) and another GET route (delivery/cut-off-times) that retrieves cut-off times using the getCutOffTimes method from DeliveryMethodsController. The routes are grouped under a delivery prefix and utilize caching middleware to enhance performance. This structure promotes organized and maintainable code.


Get Cut Off Times

  • Route: GET ../delivery/cut-off-times
  • Controller: DeliveryMethodsController
  • Method: getCutOffTimes
  • Description: Endpoint to retrieve cut-off times for delivery methods.

The getCutOffTimes method in the DeliveryMethodsController handles the request to retrieve cut-off times for various delivery methods. It interacts with the deliveryMethodsService to obtain this information.

The method constructs a JSON response containing the cut-off times data, which includes the specific time frames by which orders need to be placed to ensure timely delivery. This data helps customers and systems align their ordering processes with the available delivery schedules.

Upon successful retrieval of the cut-off times, the method returns a 200 OK response, indicating that the request was processed successfully and the data is included in the response body.


Copyright © 2026