This commit is contained in:
sayliraut
2024-06-04 15:51:25 +05:30
6 changed files with 424 additions and 205 deletions

View File

@@ -19,15 +19,15 @@ use Exception;
class RestaurantAppController extends Controller
{
public function index_restraunt_users(Request $request)
{
try {
$activeQuery = $request->query('active');
@@ -53,7 +53,7 @@ class RestaurantAppController extends Controller
// public function change_rest_user_status(Request $request)
// {
// try {
// DB::beginTransaction();
// $status = IamPrincipal::find($request->rest_user_id);
@@ -94,86 +94,66 @@ class RestaurantAppController extends Controller
// }
public function change_rest_user_status(Request $request)
{
try {
DB::beginTransaction();
$status = IamPrincipal::find($request->rest_user_id);
$status->is_active = $request->status;
{
try {
DB::beginTransaction();
$status = IamPrincipal::find($request->rest_user_id);
$status->is_active = $request->status;
// Generate a random password if status is 1 (approved)
if ($request->status == 1) {
$randomPassword = \Str::random(8); // Adjust the length as per your requirements
$status->password = bcrypt($randomPassword); // Make sure to hash the password
}
$status->save();
if ($request->status == 1) {
// Fetch user data based on user ID
$user = IamPrincipal::find($request->rest_user_id);
if ($user) {
// Send email only if user exists
$data = [
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email_address,
'password' => $randomPassword, // Pass the random password to the email template
];
Mail::to($user->email_address)->send(new RestUserApproval($data));
// Generate a random password if status is 1 (approved)
if ($request->status == 1) {
$randomPassword = \Str::random(8); // Adjust the length as per your requirements
$status->password = bcrypt($randomPassword); // Make sure to hash the password
}
$status->save();
if ($request->status == 1) {
// Fetch user data based on user ID
$user = IamPrincipal::find($request->rest_user_id);
if ($user) {
// Send email only if user exists
$data = [
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email_address,
'password' => $randomPassword, // Pass the random password to the email template
];
Mail::to($user->email_address)->send(new RestUserApproval($data));
}
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
} catch (Exception $e) {
Log::error("Update Status function Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
} catch (Exception $e) {
Log::error("Update Status function Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
// public function view_rest($id)
// {
// try {
// $restaurantView = IamPrincipal::findOrFail($id);
// // dd($restaurantView);
// return view('Admin.pages.manage_users.restaurants_app.view_restaurant_users', compact('restaurantView'));
// } catch (Exception $e) {
// Log::error("Manage Voucher Page Not Load " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
// public function view_rest($id)
// {
// try {
// $restaurantView = IamPrincipal::findOrFail($id);
// return view('Admin.pages.manage_users.restaurants_app.view_restaurant_users', compact('restaurantView'));
// } catch (Exception $e) {
// Log::error("Manage Voucher Page Not Load " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
public function view_rest($id)
{
try {
$restaurantView = IamPrincipal::with('restaurant')->findOrFail($id);
return view('Admin.pages.manage_users.restaurants_app.view_restaurant_users', compact('restaurantView'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
public function view_rest($id)
{
try {
$restaurantView = IamPrincipal::with('restaurant')->findOrFail($id);
return view('Admin.pages.manage_users.restaurants_app.view_restaurant_users', compact('restaurantView'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
}
public function edit_Restaurant($id)
public function edit_Restaurant($id)
{
try {
@@ -185,29 +165,144 @@ public function edit_Restaurant($id)
}
}
// public function updateRest(Request $request)
// {
// try {
// DB::beginTransaction();
// $rest_data = IamPrincipal::where('id', $request->rest_id)->first();
// $rest_data->first_name = $request->input('name');
// $rest_data->last_name = $request->input('last_name');
// $rest_data->phone_number = $request->input('phone');
// $rest_data->email_address = $request->input('email_id');
// $rest_data->save();
// DB::commit();
// return jsonResponseWithSuccessMessage(__('success.update_data'));
// } catch (Exception $e) {
// DB::rollBack();
// Log::error("updateCustomerNewsArticle Services Page Load Failed " . $e->getMessage());
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
// public function updateRest(Request $request)
// {
// try {
// DB::beginTransaction();
// $rest_data = IamPrincipal::find($request->input('rest_id'));
// if (!$rest_data) {
// throw new Exception('Restaurant not found.');
// }
// $rest_data->first_name = $request->input('restaurant_name');
// $rest_data->description = $request->input('restaurant_des');
// $rest_data->phone_number = $request->input('restaurant_phone');
// $rest_data->email_address = $request->input('restaurant_email');
// $rest_data->location = $request->input('restaurant_loc');
// $rest_data->bio = $request->input('restaurant_bio');
// if ($request->hasFile('restaurant_image')) {
// $imagePath = $request->file('restaurant_image')->store('images', 'public');
// $rest_data->image_path = $imagePath;
// }
// $rest_data->save();
// DB::commit();
// return response()->json(['message' => __('success.update_data')], 200);
// } catch (Exception $e) {
// DB::rollBack();
// Log::error("Update Restaurant Failed: " . $e->getMessage());
// return response()->json(['message' => __('auth.something_went_wrong')], 500);
// }
// }
public function updateRest(Request $request)
{
try {
DB::beginTransaction();
$rest_data = IamPrincipal::where('id', $request->rest_id)->first();
$rest_data->first_name = $request->input('name');
$rest_data->last_name = $request->input('last_name');
$rest_data->phone_number = $request->input('phone');
$rest_data->email_address = $request->input('email_id');
$rest_data = IamPrincipal::find($request->input('rest_id'));
// dd($request->all()) ;
if (!$rest_data) {
throw new Exception('Restaurant not found.');
}
// $rest_data->first_name = $request->input('restaurant_name');
// $rest_data->description = $request->input('restaurant_des');
// $rest_data->phone_number = $request->input('restaurant_Id');
$rest_data->phone_number = $request->input('restaurant_phone');
$rest_data->email_address = $request->input('restaurant_email');
// $rest_data->location = $request->input('restaurant_loc');
// $rest_data->bio = $request->input('restaurant_bio');
// if ($request->hasFile('restaurant_image')) {
// $imagePath = $request->file('restaurant_image')->store('images', 'public');
// $rest_data->image_path = $imagePath;
// }
$rest_data->save();
DB::commit();
return jsonResponseWithSuccessMessage(__('success.update_data'));
DB::commit();
return response()->json(['status_code' => 200, 'message' => __('success.update_data')], 200);
} catch (Exception $e) {
DB::rollBack();
Log::error("updateCustomerNewsArticle Services Page Load Failed " . $e->getMessage());
Log::error("Update Restaurant Failed: " . $e->getMessage());
return response()->json(['status_code' => 500, 'message' => __('auth.something_went_wrong')], 500);
}
}
public function delete_restaurants($id)
{
try {
DB::beginTransaction();
$restaurant = IamPrincipal::find($id);
$restaurant->delete();
DB::commit();
return response()->json(['success' => true, 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("delete_passport function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
public function archive_restaturant()
{
try {
$rest_user = IamPrincipal::where('principal_type_xid', 4)->onlyTrashed()->latest()->get();
return view('Admin.pages.manage_users.restaurants_app.archive_manage_restaurant', compact('rest_user'));
} catch (Exception $e) {
Log::error("Manage Voucher Page Not Load " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function unarchive_rest($id)
{
try {
DB::beginTransaction();
IamPrincipal::withTrashed()->where('id', $id)->restore();
DB::commit();
return response()->json(['success' => true, 'status' => 200]);
} catch (Exception $e) {
DB::rollBack();
Log::error("delete_passport function Load Failed " . $e->getMessage());
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
}

View File

@@ -37,7 +37,7 @@ $(document).on("click", ".restaurants_archive", function (e) {
if (response.status == 200) {
toastr.success('Record has been archive');
setTimeout(function () {
window.location.href = base_url + "/manage_restraunt";
window.location.href = base_url + "/restaurant_users";
}, 1000);
} else {
toastr.error("Something went wrong");
@@ -69,7 +69,7 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
if (response.status == 200) {
toastr.success('Record has been');
setTimeout(function () {
window.location.href = base_url + "/manage_restraunt";
window.location.href = base_url + "/restaurant_users";
}, 1000);
} else {
toastr.error("Something went wrong");
@@ -255,107 +255,112 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
});
});
$('#restaurant_user_form').validate({
ignore: [],
debug: false,
rules: {
restaurant_name: {
required: true,
fullNameCharactersOnly: true
},
restaurant_des:{
required: true,
},
restaurant_Id:{
required: true,
},
restaurant_loc:{
required: true,
},
restaurant_email: {
required: true,
email: true,
},
restaurant_image: {
required: true,
},
restaurant_phone: {
required: true,
numericCharactersOnly: true
},
restaurant_bio:{
required: true,
},
},
messages: {
restaurant_name: {
required: "Enter Passport Name",
alphaCharactersOnly: "Please enter only alphabetical characters"
},
restaurant_des:{
required: "Please enter description",
},
restaurant_Id:{
required: "Please enter restaurant Id",
},
restaurant_loc:{
required: "Please enter location",
},
restaurant_email: {
required: "Enter email address",
email: "Please enter a valid email address"
},
restaurant_image: {
required: "Please select the image",
},
restaurant_phone: {
required: "Enter Phone Number",
numericCharactersOnly: "Please enter only numeric characters"
},
restaurant_bio:{
required: "Please enter bio",
},
},
errorClass: 'error-message',
submitHandler: function(form) {
let base_url = url_path;
var formData = new FormData(form);
$('#restaturant_user_btn').text('Please wait...');
$('#restaturant_user_btn').attr('disabled', true);
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
$(document).ready(function() {
// console.log('dfkjb');
$('#rest_user_form').validate({
ignore: [],
debug: false,
rules: {
// restaurant_name: {
// required: true,
// fullNameCharactersOnly: true
// },
// restaurant_des:{
// required: true,
// },
// restaurant_Id:{
// required: true,
// },
// restaurant_loc:{
// required: true,
// },
restaurant_email: {
required: true,
email: true,
},
// restaurant_image: {
// required: true,
// },
restaurant_phone: {
required: true,
numericCharactersOnly: true
},
// restaurant_bio:{
// required: true,
// },
},
messages: {
// restaurant_name: {
// required: "Enter Passport Name",
// alphaCharactersOnly: "Please enter only alphabetical characters"
// },
// restaurant_des:{
// required: "Please enter description",
// },
// restaurant_Id:{
// required: "Please enter restaurant Id",
// },
// restaurant_loc:{
// required: "Please enter location",
// },
restaurant_email: {
required: "Enter email address",
email: "Please enter a valid email address"
},
// restaurant_image: {
// required: "Please select the image",
// },
restaurant_phone: {
required: "Enter Phone Number",
numericCharactersOnly: "Please enter only numeric characters"
},
// restaurant_bio:{
// required: "Please enter bio",
// },
},
errorClass: 'error-message',
submitHandler: function(form) {
let base_url = url_path;
var formData = new FormData(form);
// console.log(formData);
$('#restaturant_btn').text('Please wait...');
$('#restaturant_btn').attr('disabled', true);
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
url: base_url + '/update_restaurant',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(result) {
if (result.status_code == 200) {
toastr.success('Restaurant Updated Sucessfully');
setTimeout(function() {
window.location.href = base_url + "/restaurant_users";
}, 2000);
} else {
toastr.error('Something Went Wrong');
setTimeout(function() {
window.location.href = base_url + "/restaurant_users";
}, 2000);
}
$('#restaturant_btn').attr('disabled', false);
$('#restaturant_btn').text('Submit');
},
error: function() {
toastr.error('Something Went Wrong');
$('#restaturant_btn').attr('disabled', false);
$('#restaturant_btn').text('Submit');
}
});
}
});
$.ajax({
url: base_url + '/update_restaurant',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(result) {
if (result.status_code == 200) {
toastr.success('Restaurant Updated Sucessfully');
setTimeout(function() {
window.location.href = base_url + "/restaurant_users";
}, 2000);
} else {
toastr.error('Something Went Wrong');
setTimeout(function() {
window.location.href = base_url + "/restaurant_users";
}, 2000);
}
$('#restaturant_user_btn').attr('disabled', false);
$('#restaturant_user_btn').text('Submit');
},
});
$('#restaturant_user_btn').attr('disabled', false);
$('#restaturant_user_btn').text('Submit');
}
});
})

View File

@@ -0,0 +1,114 @@
@extends('Admin.layouts.master')
@section('content')
@php
$currentPage = 'manage-restaurant_app';
@endphp
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<!-- <h6 class="card-title">Archive patient list</h6> -->
<a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('restraunt_users') }}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
<h6 class="card-title p-0">Archive Manage Customers</h6>
</a>
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: scroll;">
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<tr>
<th class="text-start">Sr no</th>
<th class="text-start">Resturant Name</th>
<th class="text-start">Resturant ID</th>
<th class="text-start">Email Id</th>
<th class="text-start">Date Onboarded</th>
<th class="text-start">Phone Number</th>
<th class="text-start">Location</th>
<th>Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($rest_user as $rest_users)
<tr>
<td class="text-start"></td>
<td class="text-start">{{$rest_users->first_name}}</td>
<td class="text-start">{{$rest_users->id}}</td>
<td class="text-start">{{$rest_users->email_address}}</td>
<td class="text-start">{{ \Carbon\Carbon::parse($rest_users->created_at)->format('d-m-y') }}</td>
<td class="text-start">{{$rest_users->phone_number }}</td>
<td class="text-start">{{ $rest_users->state->name}}</td>
<td class="view-transcation">
<a class="pointer rest_unarchive_btn" data-id="{{$rest_users->id}}" data-toggle="modal" data-target="#restore-modal">
<img src="{{ asset('public/assets/img/restore.svg')}}" />
<span>Restore</span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="restore-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<input type="hidden" id="unarchive_id" name="unarchive_restaurant_id">
<p class="modal-text restore-modal-heading">Are you sure you want to<br>Unarchive?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom restaurant_unarchive" href="">Yes, Unarchive</a>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script>
$('#zero-config').DataTable({
"dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
"<'table-responsive'tr>" +
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
"oLanguage": {
"oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
"sLengthMenu": "Results : _MENU_",
},
"stripeClasses": [],
"lengthMenu": [7, 10, 20, 50],
"pageLength": 10
});
</script>
@endsection

View File

@@ -36,22 +36,22 @@ $currentPage = 'manage-restaurant_app';
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn h-10">
<div class="view-details Article">
<form id="restaurant_user_form">
<form id="rest_user_form">
<input type="hidden" name="rest_id" class="form-control" value="{{$editRest->id}}">
<div class="row">
<div class="col-md-6">
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Restaurant Name</label>
<input type="text" name="restaurant_name" id="restaurant_name" class="form-control" value="{{$editRest->first_name}} ">
</div>
</div>
<div class="col-md-6">
</div> -->
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Description</label>
<input type="text" class="form-control" name="restaurant_des" id="restaurant_des">
</div>
</div>
</div> -->
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Restaurant ID</label>
@@ -76,20 +76,20 @@ $currentPage = 'manage-restaurant_app';
<input type="text" class="form-control" name="restaurant_phone" id="restaurant_phone" value="{{$editRest->phone_number }}">
</div>
</div>
<div class="col-md-6">
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Image</label>
<input type="file" class="form-control" name="restaurant_image" id="restaurant_image" >
</div>
</div>
</div> -->
<div class="col-md-6">
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Bio</label>
<input type="text" class="form-control" name="restaurant_bio" id="restaurant_bio" >
</div>
</div>
<div class="col-md-6">
</div> -->
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">While at Restaurant be sure to try
:</label>
@@ -98,14 +98,16 @@ $currentPage = 'manage-restaurant_app';
<input type="text" class="form-control mb-3">
<input type="text" class="form-control mb-3">
</div>
</div>
</div> -->
<div class="col-md-6">
<button type="submit" id="restaturant_user_btn" class="download-btn-custom mt-3 w-25" >
<button type="submit" id="restaturant_btn" class="download-btn-custom mt-3 w-25" >
<span>Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
@@ -117,8 +119,7 @@ $currentPage = 'manage-restaurant_app';
@endsection
@section('section_script')
<script src="../src/plugins/src/table/datatable/datatables.js"></script>
<script src="{{ asset('public/assets/js/admin/manage_restaurant/main.js') }}"></script>
<script>
$('#zero-config').DataTable({
"dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
@@ -144,4 +145,5 @@ $currentPage = 'manage-restaurant_app';
$('<button><a class="extra-btn width-max-content" href="archive-manage-customers.php">View Archive List</a></button><button><ul class="navbar-item flex-row ms-lg-auto ms-0"><li class="nav-item dropdown action-dropdown order-lg-0 order-1"><a href="javascript:void(0);"class="nav-link dropdown-toggle user extra-btn" id="actionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><div class="avatar-container"><div class="avatar avatar-sm avatar-indicators avatar-online"><h3>Export</h3></div></div></a><div class="dropdown-menu position-absolute" aria-labelledby="actionDropdown"><div class="dropdown-item"><a href="#"><span>Download Overview</span></a></div><div class="dropdown-item"><a href="#"><span>Download Patient Data</span></a></div><div class="dropdown-item"><a href="#"> <span>Download Selected</span></a></div></div></li></ul></button>').insertBefore("#zero-config_filter label");
});
</script>
@endsection

View File

@@ -214,7 +214,7 @@ $currentPage = 'manage-restaurant_app';
<a href="{{ url('/edit_restaurant_users/' . $restaurant_user->id) }}">
<img src="{{ asset('public/assets/img/edit.svg') }}" alt="Edit" title="Edit" />
</a>
<a class="cust_archive_btn" data-id="{{ $restaurant_user->id }}" data-toggle="modal" data-target="#archive-modal">
<a class="rest_archive_btn" data-id="{{ $restaurant_user->id }}" data-toggle="modal" data-target="#archive-modal">
<img src="{{ asset('public/assets/img/archive.svg') }}" alt="Archive" title="Archive" />
</a>
</td>
@@ -351,7 +351,7 @@ $currentPage = 'manage-restaurant_app';
</script>
<script>
$(document).ready(function() {
$('<button><a class="extra-btn width-max-content" href="">View Archive List</a></button>').insertBefore("#zero-config_filter label");
$('<button><a class="extra-btn width-max-content" href="{{ route('archieve.rest') }}">View Archive List</a></button>').insertBefore("#zero-config_filter label");
});
</script>
@endsection

View File

@@ -64,6 +64,9 @@ Route::get('/change_rest_status', [RestaurantAppController::class, 'change_rest_
Route::get('/view_restaurant_users/{id}', [RestaurantAppController::class, 'view_rest'])->name('restaurantViewUsers');
Route::get('/edit_restaurant_users/{id}', [RestaurantAppController::class, 'edit_Restaurant'])->name('EditRestUsers');
Route::post('/update_restaurant', [RestaurantAppController::class, 'updateRest']);
Route::delete('/manage_restaurants_archive/{id}', [RestaurantAppController::class, 'delete_restaurants']);
Route::get('/manage_restaurants_archive', [RestaurantAppController::class, 'archive_restaturant'])->name('archieve.rest');
Route::post('/manage_restaurants_unarchive/{id}', [RestaurantAppController::class, 'unarchive_rest']);
//*******************************************************manage subadmin********************************************************