Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/www/dev-test/app/Modules/Users/Http/ |
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| Admin Module Routes
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'admin', 'namespace' => 'Admin'], function () {
Route::get('/login', 'AuthController@getLogin');
Route::post('/login', 'AuthController@postLogin');
Route::get('/logout', 'AuthController@getLogout');
});
Route::group(['prefix' => 'admin', 'as' => 'admin.','namespace' => 'Admin', 'middleware' => ['auth', 'user.permission', 'menu']], function () {
Route::group(['prefix' => 'users', 'as' => 'users.'], function () {
//therapists
Route::get('/therapists/data', ['as' => 'providers.data', 'uses' => 'TherapistController@data']);
Route::get('/therapists/{id}/delete', ['as' => 'providers.delete', 'uses' => 'TherapistController@delete']);
Route::put('/therapists/updatepass/{therapists}', ['as' => 'therapists.updatepass', 'uses' => 'TherapistController@update_pass']);
Route::put('/providers/updateavatar/{therapists}', ['as' => 'providers.updateavatar', 'uses' => 'TherapistController@update_avatar']);
Route::put('/therapists/updateareas/{therapists}', ['as' => 'therapists.updateareas', 'uses' => 'TherapistController@update_areas']);
Route::put('/therapists/updatemassagemenow/{therapists}', ['as' => 'therapists.updatemassagemenow', 'uses' => 'TherapistController@update_massage_me_now']);
Route::put('/therapists/updatecommisions/{therapists}', ['as' => 'therapists.updatecommisions', 'uses' => 'TherapistController@update_commisions']);
Route::get('/therapists/{id}/commissions-tab', ['as' => 'providers.commissions_tab', 'uses' => 'TherapistController@commissionsTab']);
Route::post('/therapists/sort_therapists', ['as' => 'providers.sort', 'uses' => 'TherapistController@sort_therapists']);
Route::post('/therapists/add_coverage_areas', ['as' => 'therapists.add_coverage_areas', 'uses' => 'TherapistController@add_coverage_areas']);
Route::post('/therapists/delete_coverage_areas', ['as' => 'therapists.delete_coverage_areas', 'uses' => 'TherapistController@delete_coverage_areas']);
Route::post('/therapists/delete_all_coverage_areas', ['as' => 'therapists.delete_all_coverage_areas', 'uses' => 'TherapistController@delete_all_coverage_areas']);
Route::post('/therapists/get_therapists_coverage_areas', ['as' => 'therapists.get_therapists_coverage_areas', 'uses' => 'TherapistController@get_therapists_coverage_areas']);
Route::post('/therapists/add_travel_cost_for_areas', ['as' => 'therapists.add_travel_cost_for_areas', 'uses' => 'TherapistController@add_travel_cost_for_areas']);
Route::post('/therapists/get_therapists_travel_cost_areas', ['as' => 'therapists.get_therapists_travel_cost_areas', 'uses' => 'TherapistController@get_therapists_travel_cost_areas']);
Route::post('/therapists/delete_travel_cost_areas', ['as' => 'therapists.delete_travel_cost_areas', 'uses' => 'TherapistController@delete_travel_cost_areas']);
Route::post('/therapists/delete_all_travel_cost_areas', ['as' => 'therapists.delete_all_travel_cost_areas', 'uses' => 'TherapistController@delete_all_travel_cost_areas']);
Route::resource('providers', 'TherapistController', ['except' => ['destroy']]);
Route::delete('/therapists/{id}/destroy', ['as' => 'therapists.destroy', 'uses' => 'TherapistController@destroy']);
Route::get('/therapists/{id}/re-activate', ['as' => 'therapists.reactivate', 'uses' => 'TherapistController@reactivateUser']);
Route::get('/therapists/{id}/de-activate', ['as' => 'therapists.deactivate', 'uses' => 'TherapistController@deactivateUser']);
Route::get('therapists/internal-notes/{id}', ['as' => 'therapists.internalNotes', 'uses' => 'TherapistController@internalNotes']);
Route::post('therapists/internal-notes/add', ['as' => 'providers.internalNotes.add', 'uses' => 'TherapistController@addInternalNotes']);
Route::post('therapists/internal-notes/update/{id}', ['as' => 'providers.internalNotes.update', 'uses' => 'TherapistController@updateinternalNotes']);
Route::post('therapists/internal-notes/delete/{id}', ['as' => 'providers.internalNotes.delete', 'uses' => 'TherapistController@deleteInternalNotes']);
Route::post('/provider/index', ['as' => 'providers.search', 'uses' => 'TherapistController@index']);
//therapist document upload
Route::post('/document/upload', ['as' => 'therapists.document.uploadDocument', 'uses' => 'TherapistController@uploadDocument']);
//Add membership from admin
Route::post('/membership/create', ['as' => 'membership.create', 'uses' => 'TherapistController@addMembership']);
Route::delete('/document/remove/{id}/{userId}', ['as' => 'therapists.document.removeDoc', 'uses' => 'TherapistController@removeDoc']);
//Update doc expiry date
Route::post('/therapists/expiry-update/{id}', ['as' => 'therapists.updateExpiry', 'uses' => 'TherapistController@updateExpiry']);
//Update doc start date
Route::post('/therapists/start-update/{id}', ['as' => 'therapists.updateStart', 'uses' => 'TherapistController@updateStart']);
Route::post('/therapists/generate-bio', ['as' => 'generateBio', 'uses' => 'TherapistController@generateBioByUserId']);
Route::get('/therapists/status-update/{id}/{is_approved}', ['as' => 'therapists.updateStatus', 'uses' => 'TherapistController@updateStatus']);
Route::post('/therapists/mark-legal-doc', ['as' => 'therapists.markLegalDoc', 'uses' => 'TherapistController@markLegalDoc']);
//therapist schedule daysoff
Route::get('/therapists/schedule/{schedule}/delete', ['as' => 'providers.schedule.delete', 'uses' => 'TherapistDaysOffController@delete']);
Route::resource('/schedule', 'TherapistDaysOffController', ['except' => ['create', 'index', 'edit', 'destroy']]);
//therapist chats
Route::get('/messages/create/{userid}', ['as' => 'provider.messages.create', 'uses' => 'TherapistChats@create']);
Route::post('/messages', ['as' => 'therapist.messages.store', 'uses' => 'TherapistChats@store']);
Route::get('/messages/{user_id}/{id}', ['as' => 'therapist.messages.show', 'uses' => 'TherapistChats@show']);
Route::put('/messages/{user_id}/{id}', ['as' => 'therapist.messages.update', 'uses' => 'TherapistChats@update']);
//clients
Route::post('/clients/index', ['as' => 'clients.search', 'uses' => 'ClientController@index']);
Route::get('/clients/data', ['as' => 'clients.data', 'uses' => 'ClientController@data']);
Route::get('/clients/{clients}/delete', ['as' => 'clients.delete', 'uses' => 'ClientController@delete']);
Route::put('/clients/updatepass/{clients}', ['as' => 'clients.updatepass', 'uses' => 'ClientController@update_pass']);
Route::put('/clients/updateavatar/{clients}', ['as' => 'clients.updateavatar', 'uses' => 'ClientController@update_avatar']);
Route::get('/clients/add_address/', ['as' => 'clients.addaddress', 'uses' => 'ClientController@add_address']);
Route::get('/clients/del_address/{id}', ['as' => 'clients.delladdress', 'uses' => 'ClientController@del_address']);
Route::resource('clients', 'ClientController');
Route::get('/clients/permanent-delete/{id}', ['as' => 'clients.permanent_delete', 'uses' => 'ClientController@permanentDelete']);
//clients chats
Route::get('clients/messages/create/{userid}', ['as' => 'clients.messages.create', 'uses' => 'ClientChats@create']);
Route::post('clients/messages', ['as' => 'clients.messages.store', 'uses' => 'ClientChats@store']);
Route::get('clients/messages/{user_id}/{id}', ['as' => 'clients.messages.show', 'uses' => 'ClientChats@show']);
Route::put('clients/messages/{user_id}/{id}', ['as' => 'clients.messages.update', 'uses' => 'ClientChats@update']);
//login as
Route::get('loginas/{id}', ['as' => 'loginas', 'uses' => 'ClientController@getLoginAs']);
//Salon
Route::post('/salon/index', ['as' => 'salon.search', 'uses' => 'SalonController@index']);
Route::get('/salon/data', ['as' => 'salon.data', 'uses' => 'SalonController@data']);
Route::get('/salon/{salon}/delete', ['as' => 'salon.delete', 'uses' => 'SalonController@delete']);
Route::put('/salon/updatepass/{salon}', ['as' => 'salon.updatepass', 'uses' => 'SalonController@update_pass']);
Route::put('/salon/updateavatar/{salon}', ['as' => 'salon.updateavatar', 'uses' => 'SalonController@update_avatar']);
Route::get('/salon/add_address/', ['as' => 'salon.addaddress', 'uses' => 'SalonController@add_address']);
Route::get('/salon/del_address/{id}', ['as' => 'salon.delladdress', 'uses' => 'SalonController@del_address']);
Route::get('/salon/make-featured-salon/{id}', ['as' => 'salon.makefeatured', 'uses' => 'SalonController@makeFeaturedSalon']);
Route::resource('salon', 'SalonController');
Route::get('/salon/edit/{id}', ['middleware' => ['check.salon'], 'uses' => 'SalonController@edit']);
//salon therapists
Route::get('/salon/{salon}/therapists', ['as' => 'salon.providers', 'uses' => 'SalonTherapistController@index']);
Route::get('salon/therapists/data/{salon_id}', ['as' => 'salon.therapists.data', 'uses' => 'SalonTherapistController@data']);
Route::get('salon/{salon_id}/therapists/create', ['as' => 'salon.therapists.create', 'uses' => 'SalonTherapistController@create']);
Route::get('salon/{salon_id}/therapists/edit', ['as' => 'salon.therapists.edit', 'uses' => 'SalonTherapistController@edit']);
Route::post('salon/therapists/store/{salon_id}', ['as' => 'salon.therapists.store', 'uses' => 'SalonTherapistController@store']);
//salon chats
Route::get('salon/messages/create/{userid}', ['as' => 'salon.messages.create', 'uses' => 'SalonChats@create']);
Route::post('salon/messages', ['as' => 'salon.messages.store', 'uses' => 'SalonChats@store']);
Route::get('salon/messages/{user_id}/{id}', ['as' => 'salon.messages.show', 'uses' => 'SalonChats@show']);
Route::put('salon/messages/{user_id}/{id}', ['as' => 'salon.messages.update', 'uses' => 'SalonChats@update']);
//Salon Gallery
Route::post('/gallery/add/{id}', ['as' => 'gallery.add', 'uses' => 'SalonGalleryController@add']);
Route::get('/salon/del_gallery/{id}', ['as' => 'salon.delgallery', 'uses' => 'SalonGalleryController@del_gallery']);
Route::get('/gallery/{gallery}/delete', ['as' => 'gallery.delete', 'uses' => 'SalonGalleryController@delete']);
Route::resource('gallery', 'SalonGalleryController');
// SALON SEO
Route::post('/seo/update/{id}', ['as' => 'admin.user.seo.update', 'uses' => 'SalonController@updateSeo']);
//Therapist My Work
Route::post('/mywork/gallery/add/{id}', ['as' => 'mywork.gallery.add', 'uses' => 'TherapistMyWorkController@add']);
Route::get('/salon/mywork/del_gallery/{id}', ['as' => 'mywork.salon.delgallery', 'uses' => 'TherapistMyWorkController@del_gallery']);
Route::get('/gallery/mywork/{gallery}/delete', ['as' => 'mywork.gallery.delete', 'uses' => 'TherapistMyWorkController@delete']);
Route::resource('/mywork', 'TherapistMyWorkController');
});
});
/*
|--------------------------------------------------------------------------
| Frontend Module Routes
|--------------------------------------------------------------------------
*/
Route::group(['namespace' => 'Frontend'], function () {
Route::post('/account/mybookings/message/{booking}', ['as' => 'account.profile.mybookings_save_message_node', 'uses' => 'AccountBookingsController@save_message_node']);
Route::get('/stripe/connect/success', 'AccountController@stripeConnectSuccess')->name('stripe.success');
Route::get('/stripe/connect/refresh', 'AccountController@stripeConnectRefresh')->name('stripe.refresh');
});
Route::group(['namespace' => 'Frontend', 'middleware' => 'auth'], function () {
//manage address book
Route::get('/account/addressbook/index', ['as' => 'account.address.index', 'uses' => 'AccountAddressController@index']);
Route::get('/account/addressbook/create', ['as' => 'account.address.create', 'uses' => 'AccountAddressController@create']);
Route::get('/account/addressbook/{id}/edit', ['as' => 'account.address.edit', 'uses' => 'AccountAddressController@edit']);
Route::post('/account/addressbook', ['as' => 'account.address.store', 'uses' => 'AccountAddressController@store']);
Route::put('/account/addressbook/{id}', ['as' => 'account.address.update', 'uses' => 'AccountAddressController@update']);
Route::get('/account/addressbook/{id}', ['as' => 'account.address.destroy', 'uses' => 'AccountAddressController@destroy']);
//manage billing address
Route::get('/account/billingaddress/index', ['as' => 'account.billingaddress.index', 'uses' => 'AccountBillingAddressController@index']);
Route::get('/account/billingaddress/create', ['as' => 'account.billingaddress.create', 'uses' => 'AccountBillingAddressController@create']);
Route::get('/account/billingaddress/{id}/edit', ['as' => 'account.billingaddress.edit', 'uses' => 'AccountBillingAddressController@edit']);
Route::post('/account/billingaddress', ['as' => 'account.billingaddress.store', 'uses' => 'AccountBillingAddressController@store']);
Route::put('/account/billingaddress/{id}', ['as' => 'account.billingaddress.update', 'uses' => 'AccountBillingAddressController@update']);
Route::get('/account/billingaddress/{id}', ['as' => 'account.billingaddress.destroy', 'uses' => 'AccountBillingAddressController@destroy']);
//my profile
Route::get('/account/profile', ['as' => 'account.profile.edit', 'uses' => 'AccountController@edit']);
Route::put('/account/profile', ['as' => 'account.profile.update', 'uses' => 'AccountController@update']);
//manage bookings && Salon Bookings
Route::get('/account/mybookings', ['as' => 'account.profile.mybookings', 'uses' => 'AccountBookingsController@index']);
Route::get('/account/mysalonbookings', ['as' => 'account.profile.mysalonbookings', 'uses' => 'SalonAccountBookingsController@index']);
Route::get('/account/pastbookings', ['as' => 'account.profile.pastbookings', 'uses' => 'AccountBookingsController@pastSalonBookings']);
Route::post('/account/mybookings/cancel/{booking}', ['as' => 'account.profile.mybookings.cancel', 'uses' => 'AccountBookingsController@cancel']);
Route::get('/account/mybookings/message/{booking}', ['as' => 'account.profile.mybookings_edit', 'uses' => 'AccountBookingsController@message']);
Route::post('/account/mybookings/message/{booking}', ['as' => 'account.profile.mybookings_save_message', 'uses' => 'AccountBookingsController@save_message']);
Route::get('/account/mybookings/track/{booking}', ['as' => 'account.profile.mybookings_track', 'uses' => 'AccountBookingsController@track_therapist']);
Route::get('/account/mybookings/track/position/{booking}', ['as' => 'account.profile.mybookings_getposition', 'uses' => 'AccountBookingsController@get_position']);
//my vouchers
Route::get('/account/myvouchers', ['as' => 'account.profile.myvouchers', 'uses' => 'AccountVouchersController@index']);
//email template check
Route::get('/account/emailtemplate', ['as' => 'account.profile.emailtemplate', 'uses' => 'SalonAccountBookingsController@emailtemplate']);
//my invoices
// Route::get('/account/myinvoices',['as'=>'account.profile.myinvoices', 'uses'=>'AccountInvoicesController@index'] );
Route::get('/account/myinvoices/{invoice}/download', ['as' => 'account.profile.myinvoices.download', 'uses' => 'AccountInvoicesController@download']);
});
Route::group(['namespace' => 'Frontend'], function () {
Route::get('/account/delete-user', ['as' => 'account.profile.delete', 'uses' => 'AccountController@deleteUserUsingEmail']);
});
/*
|--------------------------------------------------------------------------
| API Module Routes
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'api', 'namespace' => 'Api'], function () {
Route::post('/update-book-request', 'ApiTherapist@updateBookReq')->name('bookings.update.book.request');
Route::post('/socket/save-message-node/{thredId}', ['as' => 'mybookings_save_message_node', 'uses' => 'ApiTherapistMessages@save_message_node']);
Route::get('/socket/messages', ['as' => 'socket.messages.list', 'uses' => 'ApiTherapistMessages@getMessagesList']);
Route::get('/socket/messages/{id}', ['as' => 'socket.messages.list.byId', 'uses' => 'ApiTherapistMessages@getMessagesById']);
Route::get('/provider/last-location/{id}', ['as' => 'provider.last_location', 'uses' => 'ApiTherapist@providerLastLocation']);
Route::post('/send-push-noti', ['as' => 'client.send-push-noti', 'uses' => 'ApiClient@sendPushNoti']);
Route::post('/stripe/webhook', ['as' => 'stripe.webhook', 'uses' => 'ApiTherapist@stripeWebhook']);
});
//therapist api
Route::group(['prefix' => 'api/therapist', 'namespace' => 'Api', 'middleware' => ['auth:api']], function () {
Route::post('/stripe/connect/create-account', ['as' => 'stripe.connect.create.account', 'uses' => 'ApiTherapist@createAccount']);
Route::get('/stripe/account/status', ['as' => 'stripe.account.status', 'uses' => 'ApiTherapist@stripeAccountStatus']);
Route::get('/stripe/connect/dashboard-url', ['as' => 'stripe.account.dashboard.url', 'uses' => 'ApiTherapist@stripeConnectDashboard']);
Route::get('/get-latest-book-request', ['as' => 'bookings.latestbookreq', 'uses' => 'ApiTherapist@getLatestBookReq']);
//therapist service details
Route::post('/generate-bio', ['as' => 'therapists.generate-bio', 'uses' => 'ApiTherapist@generateBio']);
//therapist service details
Route::get('/services', ['as' => 'therapists.services', 'uses' => 'ApiTherapist@getServices']);
//update therapist details
Route::post('/update-profile-info', ['as' => 'therapists.update.profile', 'uses' => 'ApiTherapist@updateProfile']);
//therapist avatar update
Route::post('/profile/update-avatar', ['as' => 'therapists.document.updateAvatar', 'uses' => 'ApiTherapist@updateAvatar']);
//therapist documents
Route::post('/document/upload', ['as' => 'therapists.document.upload', 'uses' => 'ApiTherapist@uploadDoc']);
Route::get('/document/get-docs', ['as' => 'therapists.document.getDocs', 'uses' => 'ApiTherapist@getUserDocs']);
// Remove document
Route::delete('/document/remove/{id}', ['as' => 'therapists.document.remove', 'uses' => 'ApiTherapist@removeDoc']);
//verify in-app purchase
Route::post('/verify-in-app-purchase', ['as' => 'api.therapist.verify_purchase', 'uses' => 'ApiTherapist@verifyInAppPurchase']);
//get therapist bookings
Route::get('/bookings', ['as' => 'api.therapist.bookings.future', 'uses' => 'ApiTherapist@getFutureBookings']);
Route::get('/bookings/past', ['as' => 'api.therapist.bookings.past', 'uses' => 'ApiTherapist@getPastBookings']);
//booking details
Route::get('/bookings/{booking}', ['as' => 'api.therapist.bookings.details', 'uses' => 'ApiTherapist@showBooking']);
//booking actions
Route::get('/bookings/delay/{booking}/{minutes}', ['as' => 'api.therapist.bookings.delay', 'uses' => 'ApiTherapist@action_delay']);
Route::get('/bookings/cancel/{booking}', ['as' => 'api.therapist.bookings.cancel', 'uses' => 'ApiTherapist@action_cancel']);
Route::post('/booking/verify/confirm-payment', ['as' => 'api.therapist.bookings.verify_confirm_payment', 'uses' => 'ApiTherapist@verifyAndConfirmBookingPayment']);
//get clients
Route::get('/clients', ['as' => 'api.get.therapist.bookings.clients', 'uses' => 'ApiTherapist@getClients']);
Route::post('/clients', ['as' => 'api.therapist.bookings.clients', 'uses' => 'ApiTherapist@getClients']);
//add client
Route::post('/addclient', ['as' => 'api.therapist.add_client', 'uses' => 'ApiTherapist@add_client']);
//get message types
Route::get('/massage_types', ['as' => 'api.therapist.get_massage_types', 'uses' => 'ApiTherapist@get_massage_types']);
//get duration
Route::get('/durations', ['as' => 'api.therapist.get_durations', 'uses' => 'ApiTherapist@get_durations']);
//get hours
Route::post('/hours', ['as' => 'api.therapist.get_hours', 'uses' => 'ApiTherapist@available_hours']);
//add booking
Route::post('/addbooking', ['as' => 'api.therapist.add_booking', 'uses' => 'ApiTherapist@add_booking']);
//add therapists_coverage_area
Route::post('/addtherapists_coverage_area', ['as' => 'api.therapist.addtherapists_coverage_area', 'uses' => 'ApiTherapist@addtherapists_coverage_area']);
//get therapists_coverage_area
Route::post('/gettherapists_coverage_area', ['as' => 'api.therapist.gettherapists_coverage_area', 'uses' => 'ApiTherapist@gettherapists_coverage_area']);
//delete all therapists_coverage_area
Route::post('/delete_all_coverage_area', ['as' => 'api.therapist.delete_all_coverage_area', 'uses' => 'ApiTherapist@delete_all_coverage_area']);
//Change change_massage_me_status
Route::post('/change_massage_me_status', ['as' => 'api.therapist.change_massage_me_status', 'uses' => 'ApiTherapist@change_massage_me_status']);
//Change change_massage_table_status
Route::post('/change_massage_table_status', ['as' => 'api.therapist.change_massage_table_status', 'uses' => 'ApiTherapist@change_massage_table_status']);
//add working days
Route::post('/addtherapists_working_days', ['as' => 'api.therapist.addtherapists_working_days', 'uses' => 'ApiTherapist@addtherapists_working_days']);
//get therapists working days
Route::post('/gettherapists_working_days', ['as' => 'api.therapist.gettherapists_working_days', 'uses' => 'ApiTherapist@gettherapists_working_days']);
//add day off therapist days
Route::post('/add_therapists_day_off', ['as' => 'api.therapist.add_therapists_day_off', 'uses' => 'ApiTherapist@add_therapists_day_off']);
//List day off therapist days
Route::post('/get_therapists_day_off_list', ['as' => 'api.therapist.get_therapists_day_off_list', 'uses' => 'ApiTherapist@get_therapists_day_off_list']);
//get day off therapist days by id
Route::post('/get_therapists_day_off_by_id', ['as' => 'api.therapist.get_therapists_day_off_by_id', 'uses' => 'ApiTherapist@get_therapists_day_off_by_id']);
//Update day off therapist
Route::post('/update_therapists_day_off', ['as' => 'api.therapist.update_therapists_day_off', 'uses' => 'ApiTherapist@update_therapists_day_off']);
//Delete day off therapist
Route::post('/delete_therapists_day_off_by_id', ['as' => 'api.therapist.delete_therapists_day_off_by_id', 'uses' => 'ApiTherapist@delete_therapists_day_off_by_id']);
//set availability
Route::post('/availability', ['as' => 'api.therapist.set_availability', 'uses' => 'ApiTherapist@set_availability']);
//set modes of transport
Route::post('/transportmode', ['as' => 'api.therapist.set_transport', 'uses' => 'ApiTherapist@set_transport_mode']);
//set or unset book now field
Route::get('/updatebooknow', ['as' => 'api.therapist.update_book_now', 'uses' => 'ApiTherapist@update_is_book_now']);
//messages
Route::get('/messages', ['as' => 'api.therapist.get_messages', 'uses' => 'ApiTherapistMessages@get_messages']);
Route::get('/messages/{id}', ['as' => 'api.therapist.show_message', 'uses' => 'ApiTherapistMessages@show_message']);
Route::post('/messages/{id}', ['as' => 'api.therapist.update_message', 'uses' => 'ApiTherapistMessages@update_message']);
//personal messages
Route::get('/personal-messages', ['as' => 'api.therapist.get_personal_messages', 'uses' => 'ApiTherapistMessages@getPersonalMessages']);
Route::post('/create-personal-thread', ['as' => 'api.therapist.create_personalThread', 'uses' => 'ApiTherapistMessages@createPersonalThread']);
// Normal user to therapist chat
Route::get('/list-of-therapists', ['as' => 'api.therapist.get_therapists_for_chat', 'uses' => 'ApiTherapistMessages@get_therapists_for_chat']);
//get user info
Route::get('/info', ['as' => 'api.therapist.get_user_info', 'uses' => 'ApiTherapist@getUserInfo']);
//update user location
Route::post('/update_location', ['as' => 'api.therapist.store_messages', 'uses' => 'ApiLocationController@store']);
//booking checkout
Route::post('/new_appointment', ['as' => 'api.therapist.new_booking', 'uses' => 'ApiBasketTherapistController@add']);
Route::get('/new_appointment', ['as' => 'api.get.therapist.new_booking', 'uses' => 'ApiBasketTherapistController@add']);
//booking add/remove table
Route::post('/add_table', ['as' => 'api.therapist.add_table', 'uses' => 'ApiBasketTherapistController@add_table']);
Route::post('/remove_table', ['as' => 'api.therapist.remove_table', 'uses' => 'ApiBasketTherapistController@remove_table']);
//booking add/remove voucher
Route::post('/add_voucher', ['as' => 'api.therapist.add_voucher', 'uses' => 'ApiBasketTherapistController@add_voucher']);
Route::post('/remove_voucher', ['as' => 'api.therapist.remove_voucher', 'uses' => 'ApiBasketTherapistController@remove_voucher']);
//booking: pay with cash, card, existing card
Route::post('/pay_with_cash', ['as' => 'api.therapist.pay_with_cash', 'uses' => 'ApiBasketTherapistController@pay_with_cash']);
Route::post('/pay', ['as' => 'api.therapist.pay_with_card', 'uses' => 'ApiBasketTherapistController@pay']);
Route::post('/pay_existing_card', ['as' => 'api.therapist.pay_with_existing_card', 'uses' => 'ApiBasketTherapistController@pay_with_existing_card']);
Route::get('/bookings/{bookings}/create-invoice', ['as' => 'api.therapist.bookings.create_invoice', 'uses' => 'ApiTherapist@createInvoice']);
Route::get('/download/{invoices}', ['as' => 'api.therapist.morph.download', 'uses' => 'ApiTherapist@downloadInvoice']);
Route::get('/download/manual/{invoices}', ['as' => 'api.therapist.morph.manual.download', 'uses' => 'ApiTherapist@downloadInvoiceManual']);
Route::post('/manual-booking/add', ['as' => 'api.therapist.manualbooking.add', 'uses' => 'ApiTherapist@addManualBooking']);
Route::get('/manual-booking/delete/{id}', ['as' => 'api.therapist.manualbooking.delete', 'uses' => 'ApiTherapist@deleteManualBooking']);
Route::post('/manual-booking/update', ['as' => 'api.therapist.manualbooking.update', 'uses' => 'ApiTherapist@updateManualBooking']);
Route::get('/manual-booking', ['as' => 'api.therapist.manualbooking.get', 'uses' => 'ApiTherapist@getManualBookings']);
});
// Route without Authentication updated
Route::group(['prefix' => 'api/client/', 'namespace' => 'Api'], function () {
//get individual therapist hours
Route::post('/therapist-hours', ['as' => 'api.client.get_therapist_hours', 'uses' => 'ApiClient@available_therapist_hours']);
//get thetapists later
Route::post('/therapistslater', ['as' => 'api.client.get_therapists_later', 'uses' => 'ApiClient@available_therapists_later']);
//get thetapists now
Route::post('/therapistsnow', ['as' => 'api.client.get_therapists_now', 'uses' => 'ApiClient@available_therapists_now']);
Route::post('/getTherapistsNow', ['as' => 'api.client.getTherapistsNow', 'uses' => 'ApiClient@getTherapistsNow']);
//get duration
Route::get('/durations/{id}', ['as' => 'api.client.get_durations', 'uses' => 'ApiClient@get_durations']);
// Client registration
Route::post('/create', ['as' => 'api.client.create', 'uses' => 'ApiClient@createClient']);
});
// Refactored 90%
Route::group(['prefix' => 'api/client/', 'namespace' => 'Api', 'middleware' => ['auth:api']], function () {
Route::post('/booking/upload/attachments', ['as' => 'api.client.booking.upload_attachment', 'uses' => 'ApiClient@upload_booking_attachment']);
Route::get('/booking/attachments/{booking_id}', ['as' => 'api.client.booking.get_attachments', 'uses' => 'ApiClient@get_booking_attachments']);
Route::post('/booking/delete/attachments', ['as' => 'api.client.booking.delete_attachment', 'uses' => 'ApiClient@delete_booking_attachments']);
//client avatar update
Route::post('/profile/update-avatar', ['as' => 'client.update.avatar', 'uses' => 'ApiClient@updateAvatar']);
// get upcoming bookings
Route::get('/bookings/upcoming', ['as' => 'api.client.bookings.upcoming', 'uses' => 'ApiClient@getFutureBookings']);
//get therapist bookings
Route::get('/bookings/past', ['as' => 'api.client.bookings.past', 'uses' => 'ApiClient@getPastBookings']);
//booking details
Route::get('/bookings/{booking}', ['as' => 'api.client.bookings.details', 'uses' => 'ApiClient@showBooking']);
//booking details
Route::get('/bookings/salon/{booking}', ['as' => 'api.client.bookings.salon.details', 'uses' => 'ApiClient@showSalonBooking']);
//booking actions: cancel
Route::get('/bookings/cancel/{booking}', ['as' => 'api.client.bookings.cancel', 'uses' => 'ApiClient@action_cancel']);
//booking actions: extend
Route::post('/bookings/{booking}/extend', ['as' => 'api.client.bookings.extend', 'uses' => 'ApiBasketExtensionController@action_extend']);
//get message types
Route::get('/massage_types', ['as' => 'api.client.get_massage_types', 'uses' => 'ApiClient@get_massage_types']);
// //get duration
// Route::get('/durations/{id}',['as'=>'api.client.get_durations', 'uses'=>'ApiClient@get_durations']);
//get user info
Route::get('/info', ['as' => 'api.client.get_user_info', 'uses' => 'ApiClient@getUserInfo']);
//get user vouchers
Route::get('/vouchers', ['as' => 'api.client.get_user_vouchers', 'uses' => 'ApiClient@get_vouchers']);
//booking checkout
Route::post('/new_appointment', ['as' => 'api.client.new_booking', 'uses' => 'ApiBasketController@add']);
//booking checkout
Route::get('/getcart', ['as' => 'api.client.getcart', 'uses' => 'ApiBasketController@getcart']);
//delete cart
Route::get('/deletecart/{id}', ['as' => 'api.client.deletecart', 'uses' => 'ApiBasketController@deletecart']);
//update cart
Route::post('/booking/basket/updateitem', ['as' => 'api.client.updatecart', 'uses' => 'ApiBasketController@updatecartitem']);
//remove cart
Route::get('/removecart', ['as' => 'api.client.removecart', 'uses' => 'ApiBasketController@removecart']);
//booking add/remove table
Route::post('/add_table', ['as' => 'api.client.add_table', 'uses' => 'ApiBasketController@add_table']);
Route::post('/remove_table', ['as' => 'api.client.remove_table', 'uses' => 'ApiBasketController@remove_table']);
//booking add/remove voucher
Route::post('/add_voucher', ['as' => 'api.client.add_voucher', 'uses' => 'ApiBasketController@add_voucher']);
Route::post('/remove_voucher', ['as' => 'api.client.remove_voucher', 'uses' => 'ApiBasketController@remove_voucher']);
//booking checkout massage me now
Route::post('/new_appointment_now', ['as' => 'api.client.new_booking_now', 'uses' => 'ApiBasketNowController@add']);
//booking: pay with cash, card, existing card
Route::post('/pay_with_cash', ['as' => 'api.client.pay_with_cash', 'uses' => 'ApiBasketController@pay_with_cash']);
Route::post('/pay', ['as' => 'api.client.pay_with_card', 'uses' => 'ApiBasketController@pay']);
Route::post('/pay_existing_card', ['as' => 'api.client.pay_with_existing_card', 'uses' => 'ApiBasketController@pay_with_existing_card']);
Route::get('/client_token', ['as' => 'api.client.get_token', 'uses' => 'ApiBasketController@get_client_payment_token']);
//booking details: take therapist last position
Route::post('/bookings/{booking}/therapist_position', ['as' => 'api.client.bookings.therapist_position', 'uses' => 'ApiClient@get_therapist_last_position']);
});
Route::group(['prefix' => 'api/salon/', 'namespace' => 'Api'], function () {
Route::get('/stripe/payment', ['as' => 'api.salon.stripe', 'uses' => 'ApiSalon@stripeTest']);
//get salon treatments
Route::get('/treatments', ['as' => 'api.salon.treatments', 'uses' => 'ApiSalon@getTreatments']);
//get salon venues
Route::get('/venues', ['as' => 'api.salon.venues', 'uses' => 'ApiSalon@getVenues']);
//get nearest salon on the basis of location
Route::post('/nearest/venues', ['as' => 'api.salon.nearest.venues', 'uses' => 'ApiSalon@getNearestVenues']);
//Get salon details with parent services
Route::post('/details', ['as' => 'api.salon.details', 'uses' => 'ApiSalon@getSalonDetails']);
//Get sub category on the basis of parent service
Route::post('/sub-category', ['as' => 'api.salon.subcategory', 'uses' => 'ApiSalon@getSalonSubcategory']);
//Get calendar hours
Route::post('/get-hours', ['as' => 'api.salon.gethours', 'uses' => 'ApiSalon@getSalonHours']);
//Get Salon Therapist
Route::post('/get-salon-therapist', ['as' => 'api.salon.getsalontherapist', 'uses' => 'ApiSalon@getSalonTherapist']);
//Get salon therapist Info
Route::post('/get-salon-therapist-info', ['as' => 'api.salon.getsalontherapistinfo', 'uses' => 'ApiSalon@getSalonTherapistInfo']);
//get salon therapist hours
Route::post('/get-salon-therapist-hours', ['as' => 'api.salon.getsalontherapisthours', 'uses' => 'ApiSalon@getSalonTherapistHours']);
});
Route::group(['prefix' => 'api/salon/', 'namespace' => 'Api', 'middleware' => ['auth:api']], function () {
//Get sub category on the basis of parent service
Route::post('/get-cart', ['as' => 'api.salon.getcart', 'uses' => 'ApiSalon@getSalonCart']);
//add To cart
Route::post('add-to-cart', ['as' => 'api.salon.addtocart', 'uses' => 'ApiSalon@addToCart']);
//delete from cart
Route::get('delete-to-cart/{itemId}', ['as' => 'api.salon.deletetocart', 'uses' => 'ApiSalon@deleteFromCart']);
//get Cart
Route::get('get-cart', ['as' => 'api.get.salon.getcart', 'uses' => 'ApiSalon@getCart']);
//empty cart
Route::get('/empty-cart', ['as' => 'api.salon.emptycart', 'uses' => 'ApiSalon@emptyCart']);
//pay with cash
Route::get('/pay-with-cash', ['as' => 'api.salon.paywithcash', 'uses' => 'ApiSalon@payWithCash']);
//pay with token omnipay
Route::get('/pay-with-token', ['as' => 'api.salon.paywithtoken', 'uses' => 'ApiSalon@payWithToken']);
});
Route::group(['prefix' => 'api/', 'namespace' => 'Api'], function () {
//get days
Route::get('/calendar', ['as' => 'api.get_calendar', 'uses' => 'ApiClient@get_calendar']);
//get hours
Route::post('/hours', ['as' => 'api.get_hours', 'uses' => 'ApiClient@available_hours']);
//get customer service
Route::get('/customer_service', ['as' => 'api.get_customer_service', 'uses' => 'ApiClientGeneral@get_customer_service']);
//get customer service
Route::post('/contact-us', ['as' => 'api.submit.contact-us', 'uses' => 'ApiClientGeneral@contactUs']);
//get contents pages
Route::post('/page-slug', ['as' => 'api.content_pages', 'uses' => 'ApiClientGeneral@contentPages']);
//Get VAT
Route::get('/get-vat', function () {
$data = DB::select("SELECT value FROM taxes WHERE id = :id LIMIT 50", ['id' => 2]);
$vat = $data[0]->value;
return response()->json(['vat' => $vat]);
});
// Update VAT
Route::post('/update-vat', function (Request $request) {
$data = DB::select("SELECT value FROM taxes WHERE id = :id LIMIT 50", ['id' => 2]);
$vat = $data[0]->value;
DB::update("UPDATE taxes SET value = :value WHERE id = :id", [
'value' => isset($request->vat_percent) ? $request->vat_percent : $vat,
'id' => 2
]);
return response()->json(['message' => 'VAT updated successfully.']);
});
});
Route::group(['prefix' => 'api/', 'namespace' => 'Api', 'middleware' => ['auth:api']], function () {
Route::post('/booking/ask-for-booking', ['as' => 'bookings.client.askForBooking', 'uses' => 'ApiClient@askForBooking']);
Route::post('/device-logout', ['as' => 'client.device-logout', 'uses' => 'ApiClient@deviceLogout']);
//get postcode
Route::post('/postcodes', ['as' => 'api.get_postcode', 'uses' => 'ApiLocationController@get_address_list']);
//validate postcode and get full details_product
Route::post('/postcodes/validate', ['as' => 'api.get_address_details', 'uses' => 'ApiLocationController@get_address_details']);
// //get days
// Route::get('/calendar',['as'=>'api.get_calendar', 'uses'=>'ApiClient@get_calendar']);
// //get hours
// Route::post('/hours',['as'=>'api.get_hours', 'uses'=>'ApiClient@available_hours']);
//User Addresses
Route::get('/user-addresses', ['as' => 'api.get_addresses', 'uses' => 'ApiAccountAddress@get_addresses']);
Route::get('/user-addresses1', ['as' => 'api.get_addresses1', 'uses' => 'ApiAccountAddress@get_addresses1']);
//add New address
Route::post('/add-address', ['as' => 'api.add_address', 'uses' => 'ApiAccountAddress@addAddress']);
//update New address
Route::post('/update-address', ['as' => 'api.update_address', 'uses' => 'ApiAccountAddress@updateAddress']);
Route::post('/delete-address', ['as' => 'api.delete_address', 'uses' => 'ApiAccountAddress@deleteAddress']);
Route::get('/get-notification', ['as' => 'api.notifications', 'uses' => 'ApiNotifications@notifications']);
Route::post('/mark-noti-as-read', ['as' => 'api.mark.noti.as.read', 'uses' => 'ApiNotifications@markNotiAsRead']);
Route::get('/booking-request-reports', ['as' => 'api.booking.request.reports', 'uses' => 'ApiTherapist@getBookingReqReport']);
// //get customer service
// Route::get('/customer_service',['as'=>'api.get_customer_service', 'uses'=>'ApiClientGeneral@get_customer_service']);
//get customer service
Route::get('/agreement_reference', ['as' => 'api.get_contract_file', 'uses' => 'ApiClientGeneral@get_therapist_contract']);
// Review And Rating
Route::post('/review-rating', ['as' => 'api.reviewRating', 'uses' => 'ApiClientGeneral@postReviewAndRating']);
Route::get('/trigger-review-modal', ['as' => 'api.reviewModal', 'uses' => 'ApiClientGeneral@reviewModal']);
Route::post('/handle-cancel-skip', ['as' => 'api.handleSkipCancel', 'uses' => 'ApiClientGeneral@handelSkipCancel']);
});
Route::group(['prefix' => 'api/', 'namespace' => 'Api'], function () {
Route::get('/get-default-radius', ['as' => 'api.get_default_radius', 'uses' => 'ApiClientGeneral@getDefaultRadius']);
//get FAQ
Route::get('/faq', ['as' => 'api.get_faq', 'uses' => 'ApiClientGeneral@get_faq']);
//get legals
Route::get('/legals', ['as' => 'api.get_legals', 'uses' => 'ApiClientGeneral@get_legals']);
//get privacy policy
Route::get('/privacy-policy', ['as' => 'api.privacy_policy', 'uses' => 'ApiClientGeneral@get_privacy_policy']);
//get legals
Route::get('/corporate', ['as' => 'api.get_corporate', 'uses' => 'ApiClientGeneral@get_corporate']);
//post reset password
Route::post('/reset_password', ['as' => 'api.reset_pass', 'uses' => 'ApiPasswordController@sendResetLinkEmail']);
//post register password
Route::post('/register', ['as' => 'api.register', 'uses' => 'ApiRegisterController@register']);
Route::post('/mobile-app-register', ['as' => 'mobile.app.register', 'uses' => 'ApiRegisterController@register']);
//post reset password
Route::post('/salon-register', ['as' => 'api.salon.register', 'uses' => 'ApiRegisterController@salon_register']);
//test notifications
Route::get('/notifications/test/{user}', ['as' => 'notifications.test', 'uses' => 'ApiNotifications@send_test']);
Route::get('/delete-user/{id}', ['as' => 'delete.alluser', 'uses' => 'ApiClient@deleteUserUsingId']);
//send OTP to mobile
Route::post('/2fa-send-otp', ['as' => '2fa.api.send_otp', 'uses' => 'ApiClient@sendOTPtoMobile']);
///verify OTP
Route::post('/verify-otp', ['as' => 'api.send_otp', 'uses' => 'ApiClient@verifyOTP']);
// Parent Category
Route::get('/get-parent-category', ['as' => 'api.parent_category', 'uses' => 'ApiTherapist@getParentCategory']);
});
// Apis for Categories And Sub Categories
Route::group(['prefix' => 'api/', 'namespace' => 'Api'], function () {
// In person Categories
Route::get('/treatment/inperson', ['as' => 'api.treatment.inperson', 'uses' => 'ApiBasketController@inPerson']);
// Online Categories
Route::get('/treatment/online', ['as' => 'api.treatment.online', 'uses' => 'ApiBasketController@online']);
//salon Category
Route::get('/treatment/salon-treatments', ['as' => 'api.treatment.salontreatment', 'uses' => 'ApiBasketController@salonTreatments']);
// Categories
Route::get('/treatment/subcategory/{id}', ['as' => 'api.treatment.subcategory', 'uses' => 'ApiBasketController@subCategory']);
// Treatment Info
Route::get('/treatment/info/{id}', ['as' => 'api.treatment.treatmentInfo', 'uses' => 'ApiBasketController@treatmentInfo']);
Route::post('/create-payment-intent', ['as' => 'api.create-payment-intent', 'uses' => 'ApiBasketController@createPaymentIntent']);
Route::post('/list-of-therapists', ['as' => 'api.therapist.providers', 'uses' => 'ApiTherapistMessages@get_therapists_for_chat']);
});
Route::get('watch/tradze/how-it-works', function () {
return view('users::watch.how_it_works');
});
Route::get('count-bookings', ['as' => 'api.count.bookings', 'uses' => 'Api\ApiClient@countBookings']);
Route::get('/new-order-email-template',['as' => 'new.order-email-template', 'uses' => 'Frontend\AccountController@newOrderEmailTemplate']);
Route::get('/delay-booking-email-template',['as' => 'delay-booking-email-template', 'uses' => 'Frontend\AccountController@delayBookingEmailTemplate']);
Route::get('/cancel-booking-email-template',['as' => 'cancel-booking-email-template', 'uses' => 'Frontend\AccountController@cancelBookingEmailTemplate']);
Route::get('/booking-confirmation-email-template',['as' => 'booking-confirmation-email-template', 'uses' => 'Frontend\AccountController@testEmailTemplate']);