1. Go to this page and download the library: Download dropday-io/laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Dropday\Dropday\Dropday;
class OrderController extends Controller
{
public function __construct(protected Dropday $dropday) {}
public function store(Request $request): JsonResponse
{
$result = $this->dropday->createOrder($request->validated());
return response()->json($result);
}
}
// Submit a new order for fulfillment
Dropday::createOrder(array $data): array
// List orders, optionally filtered
Dropday::getOrders(array $filters = []): array
// Retrieve a single order by its Dropday reference ID
Dropday::getOrder(string $reference): array