customer support interface

This commit is contained in:
Omair Saleh
2023-01-24 04:18:01 +08:00
parent fcbc55eabf
commit 17b76dc8e3
2 changed files with 57 additions and 0 deletions
@@ -0,0 +1,19 @@
@extends('layouts.base_portal')
@section('inner_content')
<div class="row">
<div class="col bg-white p-t-15 p-b-15">
<div class="row no-margin">
<div class="col-12">
<form method="post" >
@csrf
<input type="text" name="marking" value="{{$marking}}">
<input type="email" name="email" value="{{$email}}">
<input type="text" name="booking_reference" value="{{$bookingReference}}">
<button type="submit">Search</button>
</form>
</div>
</div>
{{dd($company, $booking)}}
</div>
</div>
@endsection
+38
View File
@@ -103,6 +103,44 @@ Route::get('/purchase_orders', function () {
return view('pages.purchase_orders');
})->name('purchase_orders');
Route::get('/support', function () {
return view('pages.customer_support');
})->name('support');
Route::post('/support', function (Request $request) {
$marking = $request->input('marking');
$email = $request->input('email');
$bookingReference = $request->input('bookingReference');
$company = null;
$booking = null;
if($email) {
$company = Company::whereHas('Employees', function($user) use($email) {
return $user->where('email', $email);
})->first();
}
if($marking) {
$company = Company::where('reference', $marking)->first();
}
if($bookingReference) {
$booking = Booking::where('marking', $bookingReference)->first();
$company = $booking->company;
}
return view('pages.customer_support', [
'marking' => $marking,
'email' => $email,
'bookingReference' => $bookingReference,
'company' => $company,
'booking' => $booking,
]);
})->name('support');
Route::get('/online_payment/redirect', 'Billplz\CallbackBillplzController@callback')->name('online_payment.redirect');
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');