Files
cheerstothe_season_2.0/routes/customer_api.php

104 lines
5.8 KiB
PHP

<?php
use App\Http\Controllers\APIs\Customer_API\AuthController;
use App\Http\Controllers\APIs\Customer_API\CMSApiController;
use App\Http\Controllers\APIs\Customer_API\ContactUsApiController;
use App\Http\Controllers\APIs\Customer_API\CustomerControllerApi;
use App\Http\Controllers\APIs\Customer_API\FeedbackApiController;
use App\Http\Controllers\APIs\Customer_API\NotificationController;
use App\Http\Controllers\APIs\Customer_API\RestaurantControllerApi;
use App\Http\Controllers\APIs\Customer_API\RulesControllerAPI;
use App\Http\Controllers\Admin\ReferralCodeController;
use App\Http\Controllers\APIs\Customer_API\StripeWebhookController;
use App\Http\Controllers\APIs\Customer_API\SubscriptionController;
use Illuminate\Support\Facades\Route;
// Route::post('/v1/stripe/webhook', [StripeWebhookController::class, 'getWebhook']);
Route::post('/v1/stripe-webhook', [StripeWebhookController::class, 'handleWebhook']);
// Route::post('/v1/stripe/webhook', [StripeWebhookController::class, 'getWebhook']);
Route::middleware(['customerApiBasicAuth'])->group(function () {
Route::post('/v1/create-subscription-plans', [SubscriptionController::class, 'createStripeProduct']);
Route::post('/v1/update-trial_period', [SubscriptionController::class, 'updateTrialPeriod']);
Route::post('/v1/check-age', [AuthController::class, 'checkAge']);
Route::get('/v1/list-states', [AuthController::class, 'viewstates']);
Route::post('/v1/register', [AuthController::class, 'register']);
Route::post('/v1/login', [AuthController::class, 'login']);
Route::post('/v1/forgot-password', [AuthController::class, 'forgotPassword']);
Route::post('/v1/password/verify-otp', [AuthController::class, 'verifyOtpForgotPassword']);
Route::post('/v1/change-password', [AuthController::class, 'changePassword']);
Route::post('/v1/resend-otp', [AuthController::class, 'resendOtp']);
Route::post('/v1/search-state', [AuthController::class, 'searchState']);
Route::group(['middleware' => ['customer.jwt.verify']], function () {
//*******************************************************CMS********************************************************
Route::get('/v1/list-of-faqs', [CMSApiController::class, 'getfaq']);
Route::get('/v1/list-of-about-us', [CMSApiController::class, 'getAboutUs']);
Route::get('/v1/list-of-privacy-policy', [CMSApiController::class, 'getPrivacyPolicy']);
Route::get('/v1/list-of-news-articles', [CMSApiController::class, 'getNewsArticles']);
Route::get('/v1/list-of-terms-conditions', [CMSApiController::class, 'getTermsConditon']);
//*******************************************************Contact Us********************************************************
Route::post('/v1/contact-us', [ContactUsApiController::class, 'addContactForm']);
//*******************************************************customer profile********************************************************
Route::get('/v1/fetch-user-profile', [CustomerControllerApi::class, 'getUserProfileDetail']);
Route::post('/v1/update-user-profile', [CustomerControllerApi::class, 'updateUserProfileDetail']);
Route::post('/v1/reset-user-password', [CustomerControllerApi::class, 'resetUserPassword']);
Route::post('/v1/customer-logout', [CustomerControllerApi::class, 'customerLogout']);
Route::post('/v1/delete_account', [CustomerControllerApi::class, 'destroyAccount']);
Route::get('/v1/check_subscription', [CustomerControllerApi::class, 'CheckSubscription']);
//*******************************************************Restaurant********************************************************
Route::get('/v1/detail-of-restaurant/{id}', [RestaurantControllerApi::class, 'DetailRestaurant']);
Route::post('/v1/add-to-favourite', [RestaurantControllerApi::class, 'addToFavourite']);
Route::get('/v1/list-of-fav-restaurant', [RestaurantControllerApi::class, 'listFavRestaurant']);
Route::get('/v1/list-of-coordinates', [RestaurantControllerApi::class, 'getCoordinates']);
Route::post('/v1/remove-from-favourite', [RestaurantControllerApi::class, 'removeFromFavourite']);
Route::post('/v1/search-from-favourite', [RestaurantControllerApi::class, 'searchFromFavourite']);
Route::post('/v1/redeem-restaurant', [RestaurantControllerApi::class, 'redeemRestaurant']);
Route::post('/v1/search-restaurant', [RestaurantControllerApi::class, 'searchRestaurant']);
//*******************************************************notification********************************************************
Route::get('/v1/get-notification', [NotificationController::class, 'getNotificationApi']);
Route::post('/v1/send-notification', [NotificationController::class, 'sendNotificationApi']);
Route::post('/v1/customer-alert-notification', [NotificationController::class, 'AlertNotificationApi']);
//*******************************************************Feedback********************************************************
Route::get('/v1/feedback-reactions', [FeedbackApiController::class, 'getFeedbackReaction']);
Route::post('/v1/store-feedback', [FeedbackApiController::class, 'storeFeedback']);
//*******************************************************Check referral code********************************************************
Route::post('/v1/check-referral', [ReferralCodeController::class, 'CheckReferral']);
//*******************************************************Rules ********************************************************
Route::get('/v1/voucher-rules', [RulesControllerAPI::class, 'getVoucherRules']);
Route::get('/v1/referral-rules', [RulesControllerAPI::class, 'getReferralRules']);
});
});