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.
13 lines
414 B
PHP
13 lines
414 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\OrderController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
});
|
|
|
|
Route::get('/order', [OrderController::class, 'create'])->name('orders.create');
|
|
Route::post('/order', [OrderController::class, 'store'])->name('orders.store');
|
|
Route::get('/order/success/{shipment}', [OrderController::class, 'success'])->name('orders.success');
|