Introduce order management functionality including web routes for creating orders and a new API endpoint for price calculations. This change also cleans up the codebase by removing various debug scripts used during the development of the shipping rate logic. - Add `OrderController` to handle order creation and success redirection. - Add `POST /v1/calculate` endpoint for pricing calculations. - Define web routes for order creation flow (`/order`). - Remove multiple debug PHP scripts from the `04_Laravel` directory. - Add base layout and order view directories.
14 lines
436 B
PHP
14 lines
436 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\PricingController;
|
|
use App\Http\Controllers\Api\TrackController;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Middleware\ApiKeyMiddleware;
|
|
|
|
Route::middleware([ApiKeyMiddleware::class])->prefix('v1')->group(function () {
|
|
Route::get('/track/{awb_no}', [TrackController::class, 'show']);
|
|
});
|
|
|
|
Route::post('/v1/calculate', [PricingController::class, 'calculate']);
|