Files
kulakpos_web/public/restaurant/Modules/Customer/routes/api.php

36 lines
1.7 KiB
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
<?php
use Illuminate\Support\Facades\Route;
use Modules\Customer\Http\Controllers\CustomerAuthController;
use Modules\Customer\Http\Controllers\CustomerController;
use Modules\Restaurant\Http\Controllers\API\FoodReviewController;
use Modules\Restaurant\Http\Controllers\API\FoodReviewReplyController;
Route::post('v1/customer-login', [CustomerAuthController::class, 'customerLogin']);
Route::post('v1/customer-otp-verify', [CustomerAuthController::class, 'customerOtpVerify']);
Route::post('v1/customer-otp-sent', [CustomerAuthController::class, 'customerOtpSent']);
Route::middleware(['auth:customer'])->group(function () {
Route::prefix('v1/customer')->group(function () {
// Customer Profile
Route::get('profile', [CustomerAuthController::class, 'customerProfile']);
Route::post('update', [CustomerAuthController::class, 'customerUpdate']);
Route::post('change-password', [CustomerAuthController::class, 'changePassword']);
Route::post('account-delete', [CustomerAuthController::class, 'accountDeleted']);
Route::post('logout', [CustomerAuthController::class, 'customerLogout']);
// Booking
Route::get('booking', [CustomerController::class, 'myBooking']);
Route::post('booking', [CustomerController::class, 'booking']);
// Customer Orders
// Order related All things.
Route::post('my-orders/{order}/cancel', [CustomerController::class, 'cancel']);
Route::apiResource('my-orders', CustomerController::class);
// Customer Protected Routes
Route::apiResource('customer-food-reviews', FoodReviewController::class);
Route::apiResource('customer-reviews-replies', FoodReviewReplyController::class);
});
});