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.
56 lines
2.4 KiB
PHP
56 lines
2.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="rtl">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{ config('app.name', 'IFNEX Logistics') }} — ثبت سفارش</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
|
</head>
|
|
<body class="bg-gray-50 text-gray-800 font-sans">
|
|
<nav class="bg-white shadow-sm border-b border-gray-200">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<div class="flex justify-between h-16">
|
|
<div class="flex items-center">
|
|
<a href="/" class="text-xl font-bold text-orange-600">IFNEX Logistics</a>
|
|
</div>
|
|
<div class="flex items-center gap-4">
|
|
<a href="{{ route('orders.create') }}" class="text-gray-600 hover:text-orange-600 px-3 py-2 rounded-md text-sm font-medium">ثبت سفارش</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="py-8">
|
|
@if(session('success'))
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-6">
|
|
<div class="bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded-md">
|
|
{{ session('success') }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@if($errors->any())
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-6">
|
|
<div class="bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-md">
|
|
<ul class="list-disc list-inside">
|
|
@foreach($errors->all() as $error)
|
|
<li>{{ $error }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
@yield('content')
|
|
</main>
|
|
|
|
<footer class="bg-white border-t border-gray-200 mt-auto">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
|
|
<p class="text-center text-sm text-gray-500">© {{ date('Y') }} IFNEX Logistics. All rights reserved.</p>
|
|
</div>
|
|
</footer>
|
|
|
|
@stack('scripts')
|
|
</body>
|
|
</html>
|