------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------`
https://ashallendesign.co.uk/blog/how-to-create-your-own-helper-functions-in-laravel
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WEB.PHP IN ROUTES
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\CarController;
use App\Http\Controllers\AdminController;
use App\Http\Controllers\DriverController;
use App\Http\Controllers\Customer;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\CustomerController;
Route::get('/',[CarController::class,'index']);
Route::get('/about',[CarController::class,'about']);
Route::get('/booking/{id}',[CarController::class,'booking']);
Route::post('/booking_details',[CarController::class,'booking_details']); // booking_details
Route::get('/contact',[CarController::class,'contact']);
Route::get('/detail/{id}',[CarController::class,'detail']);
Route::get('/service',[CarController::class,'service']);
Route::get('/team',[CarController::class,'team']);
Route::get('/car',[CarController::class,'car']);
Route::get('/testimonial',[CarController::class,'testimonial']);
Route::post('/confmac',[CarController::class, 'confmac']);
Route::post('/clcontact',[CarController::class,'clcontact']);
Route::get('/driverProfile/{id}',[CarController::class,'driverProfile']);
// // ------------------------------------------------------------------------------
// Customer routes // Customer routes // Customer routes // Customer routes // Customer routes
// chck_avail
Route::post('/chck_avail',[CarController::class,'chck_avail']);
//search for availability top search area
Route::post('/search_avail',[CarController::class,'search_avail']);
Route::post('/srchFromAvai',[CarController::class,'srchFromAvai']);
// ------------------------------------------------------------------------------
// DRiver routes // DRiver routes // DRiver routes // DRiver routes // DRiver routes
Route::get('/driver',[DriverController::class,'driver_portal']);
// driverRegister driverLogin
Route::get('/driverRegister',[DriverController::class,'driverRegister']);
Route::post('/driver_reg',[DriverController::class,'driver_reg']);
Route::get('/driverLogin',[DriverController::class,'driverLogin']);
Route::post('/driver_login',[DriverController::class,'driver_login']);
// driverLogout
Route::get('/driverLogout',[DriverController::class,'driverLogout']);
// ------------------------------------------------------------------------------
// Admin routes // Admin routes // Admin routes // Admin routes // Admin routes
Route::get('/adregister',[AdminController::class,'register']);
Route::get('/adforget_pass',[AdminController::class,'forget_pass']);
Route::get('/adlogin',[AdminController::class,'login']);
// adfrinac
Route::post('/adfrinac',[AdminController::class,'adfrinac']);
Route::post('/adlgac',[AdminController::class,'adlgac']);
Route::middleware('OnlyAccess')->group(function(){
// only logged in users related routes here
// common for driver customer and admin
Route::get('/adindex',[AdminController::class,'index']);
Route::get('/adlogout', function () {
if(session()->has('adeu')){
session()->forget('adeu');
session()->forget('user_id');
}
Auth::logout();
// index function in admin helps to redirect back
return redirect('adlogin');
});
// common ends
// show own account
Route::get('/adacc',[AdminController::class,'adacc']);
});
Route::group(['middleware'=>['disable_back_btn']], function(){
Route::middleware('Driver')->group(function(){
Route::get('/driverindex', function(){
return "Driver Logged in";
});
// /driver related routes here
// driverAccount
Route::get('/driverAccount',[DriverController::class,'driverAccount']);
Route::post('/driver_update',[DriverController::class,'driver_update']);
// driverPassword
Route::get('/driverPassword',[DriverController::class,'driverPassword']);
Route::post('/driver_Pass_Chng',[DriverController::class,'driver_Pass_Chng']);
// driver OnRequest
Route::get('/onRequest',[DriverController::class,'onRequest']);
Route::get('/dvr_availunavail/{id}/{status}',[DriverController::class,'dvr_availunavail']);
Route::post('/dvr_rply',[DriverController::class,'dvr_rply']);
Route::get('/bookings',[DriverController::class,'bookings']);
Route::get('/bookingConfirm/{id}/{status}',[DriverController::class,'bookingConfirm']);
Route::post('/SrchCustmrasDriver',[DriverController::class,'SrchCustmrasDriver']);// Driver Search
Route::get('/earnings',[DriverController::class,'earnings']);// earnings
Route::get('/viewTrip/{id}',[DriverController::class,'viewTrip']);// viewTrip
Route::get('/regTrips/{id}/{status}',[DriverController::class,'regTrips']);// regTrips
Route::get('/feedbackMailSend/{id}',[DriverController::class,'feedbackMailSend']);// Feedback Mail Send
});
Route::middleware('Customer')->group(function(){
Route::get('/customerindex', function(){
return "Customer Logged in";
});
// /cutomer related routes here
Route::get('/chkRequests',[CustomerController::class,'chkRequests']);
Route::get('/RequestSrch_cs',[CustomerController::class,'RequestSrch_cs'])->name('RequestSrch_cs');
Route::post('/avai_date_srch_cs',[CustomerController::class,'avai_date_srch_cs']);
Route::get('/BookingSrch_cs',[CustomerController::class,'BookingSrch_cs'])->name('BookingSrch_cs');
Route::post('/bkk_date_srch_cs',[CustomerController::class,'bkk_date_srch_cs']);
Route::get('/chkBooking',[CustomerController::class,'chkBooking']);
Route::get('/myTrip/{id}',[CustomerController::class,'myTrip']);
Route::get('/myTrip2/{id}',[CustomerController::class,'myTrip2']);
Route::get('/addTesti/{id}',[CustomerController::class,'addTesti']);
Route::post('/submitTesti',[CustomerController::class,'submitTesti']);
});
Route::group(['middleware'=>['adlgchk']], function(){
Route::middleware('isAdmin')->group(function(){
// if checked by isAdmin, driver & customer cannot access it
// Route::get('/adindex',[AdminController::class,'index']);
// Route::get('/adlogout', function () {
// if(session()->has('adeu')){
// session()->forget('adeu');
// }
// Auth::logout();
// return redirect('adlogin');
// });
// driver & customer cannot access these routes
Route::get('/admail',[AdminController::class,'mailbox']);
Route::post('/admailsend',[AdminController::class,'admailsend']);
Route::get('/mail_rply/{id}',[AdminController::class,'mail_rply']);
// Route::get('/adacc',[AdminController::class,'adacc']); mail_rply
Route::post('/adfrupdateac',[AdminController::class,'adupac']);
Route::get('/adchpas',[AdminController::class,'adchpas']);
Route::post('/adpassupdate',[AdminController::class,'adpassupdate']);
Route::get('/chnger',[AdminController::class,'pagebannertitlechangeview']);
Route::post('/acinacfmac',[AdminController::class,'acinacfmac'])->name('acinacfmac');
// acinacfmac pggedit
Route::post('/pggedit',[AdminController::class,'pggedit']);
Route::post('/editpggac',[AdminController::class,'editpggac']);
Route::post('/mailsrch',[AdminController::class,'mailsrch']);
Route::get('/add_page',[AdminController::class,'pgadds']);
Route::get('/deletepage/{id}',[AdminController::class,'pgdeletes']);
Route::post('/addpggac',[AdminController::class,'addpggac']);
Route::get('/user_roles',[AdminController::class,'user_roles']);
Route::post('/usersrch',[AdminController::class,'user_srch']);
Route::get('/user_roles',[AdminController::class,'user_roles']);
Route::post('/user_role_edit',[AdminController::class,'user_role_edit']);
Route::post('/edit_ac_user_role',[AdminController::class,'edit_ac_user_role']);
Route::get('/add_user_role',[AdminController::class,'add_user_role']);
Route::post('/add_ac_user_role',[AdminController::class,'add_ac_user_role']);
Route::post('/user_role_delete',[AdminController::class,'user_role_delete']);
Route::post('/acInacUserDri',[AdminController::class,'acInacUserDri'])->name('acInacUserDri');
Route::get('/driverList',[AdminController::class,'driverList']);
// car list
Route::get('/carList',[AdminController::class, 'carList']);
Route::get('/addCars',[AdminController::class, 'addCars']);
Route::post('/car_added',[AdminController::class, 'car_added']);
Route::post('/car_edit',[AdminController::class, 'car_edit']); // car edit car_edit
Route::post('/car_edit_ac',[AdminController::class, 'car_edit_ac']);
Route::get('/carDelete/{id}',[AdminController::class,'carDelete']);
Route::post('/acInacCars',[AdminController::class,'acInacCars'])->name('acInacCars');
Route::get('/readRequest',[AdminController::class,'readRequest']);
Route::get('/RequestSrch',[AdminController::class,'RequestSrch'])->name('RequestSrch');
Route::post('/avai_date_srch',[AdminController::class,'avai_date_srch']);
Route::get('/bookingList',[AdminController::class,'bookingList']);
Route::get('/BookingSrch',[AdminController::class,'BookingSrch'])->name('BookingSrch');
Route::post('/bkk_date_srch',[AdminController::class,'bkk_date_srch']);
Route::get('/allDr_Cu',[AdminController::class,'allDr_Cu']);
Route::get('/userSel/{type}',[AdminController::class,'userSel']);
Route::get('/adShowTrip/{id}',[AdminController::class,'adShowTrip']);
Route::get('/drEarnings',[AdminController::class,'drEarnings']);
Route::get('/showTesti',[AdminController::class,'showTesti']);
Route::post('/testiAcIn',[AdminController::class,'testiAcIn']);
Route::get('/delTestimonial/{id}',[AdminController::class,'delTestimonial']);
Route::get('/bkkSrch',[AdminController::class,'bkkSrch'])->name('bkkSrch');
Route::post('/earning_date_srch',[AdminController::class,'earning_date_srch']);
Route::post('/excelExport',[AdminController::class,'excelExport']);
});
//isAdmin ends here
} );
//grp end
} );
Route::get('/hsd', function(){
return view('hackingsessiondata');
}
);
Route::get('/mail', function(){
return view('admin.mail');
} );
VIES FILES
ABOUT.BLADE.PHP
@include('header')
<head>
<title>ABOUT </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header" >
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
About
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
About
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- About Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5">Welcome To <span class="text-primary">Royal Cars</span></h1>
<div class="row justify-content-center">
<div class="col-lg-10 text-center">
<img class="w-75 mb-4" src="img/about.png" alt="">
<p>Justo et eos et ut takimata sed sadipscing dolore lorem, et elitr labore labore voluptua no rebum sed, stet voluptua amet sed elitr ea dolor dolores no clita. Dolores diam magna clita ea eos amet, amet rebum voluptua vero vero sed clita accusam takimata. Nonumy labore ipsum sea voluptua sea eos sit justo, no ipsum sanctus sanctus no et no ipsum amet, tempor labore est labore no. Eos diam eirmod lorem ut eirmod, ipsum diam sadipscing stet dolores elitr elitr eirmod dolore. Magna elitr accusam takimata labore, et at erat eirmod consetetur tempor eirmod invidunt est, ipsum nonumy at et.</p>
</div>
</div>
<div class="row mt-3">
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-light p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-headset text-secondary"></i>
</div>
<h4 class="text-uppercase m-0">24/7 Car Rental Support</h4>
</div>
</div>
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-secondary p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-car text-secondary"></i>
</div>
<h4 class="text-light text-uppercase m-0">Car Reservation Anytime</h4>
</div>
</div>
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-light p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-map-marker-alt text-secondary"></i>
</div>
<h4 class="text-uppercase m-0">Lots Of Pickup Locations</h4>
</div>
</div>
</div>
</div>
</div>
<!-- About End -->
<!-- Banner Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="row mx-0">
<div class="col-lg-6 px-0">
<div class="px-5 bg-secondary d-flex align-items-center justify-content-between" style="height: 350px;">
<img class="img-fluid flex-shrink-0 ml-n5 w-50 mr-4" src="img/banner-left.png" alt="">
<div class="text-right">
<h3 class="text-uppercase text-light mb-3">Want to be driver?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="/driver">Start Now</a>
</div>
</div>
</div>
<div class="col-lg-6 px-0">
<div class="px-5 bg-dark d-flex align-items-center justify-content-between" style="height: 350px;">
<div class="text-left">
<h3 class="text-uppercase text-light mb-3">Looking for a car?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="/car">Start Now</a>
</div>
<img class="img-fluid flex-shrink-0 mr-n5 w-50 ml-4" src="img/banner-right.png" alt="">
</div>
</div>
</div>
</div>
</div>
<!-- Banner End -->
@include('footer')
availReqSrch.blade.php
@include('header')
<head>
<title>SEARCH </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<div class="table my-5 px-5 ">
<table class="table">
<thead>
<tr class="bg-dark text-light">
<th> Sr. No. </th>
<th> Customer </th>
<th> Driver </th>
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Mail </th>
<th> Available </th>
</tr>
</thead>
<tbody>
<?php $c = 1; ?>{{-- ['adeu' => $adfn, 'data'=>$data, 'cust'=>$cust, 'car'=>$car, 'driver'=>$driver --}}
@if(count($data)>0)
@foreach ($data as $item)
<tr @if ($item->available) style="background: #ebb96e5b" @endif>
<td>{{ $c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ findDri($item->driver_id)}}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->droploc) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->putime }}</td>
<td>
@if ($item->mail)
<h5 class="text-success">Mail sent</h5>
@else
<h5 class="text-info">No Mails</h5>
@endif
</td>
<td>
{{-- null => no res, 0=>unavi 1=> avai book now 2=> booked 3=> booking confirm --}}
{{-- 1=>booked 2=>bkkcnfm 0=>noRes --}}
@if ($item->available == null)
<h5 class="text-info">No response</h5>
@else
@if($item->available == 1)
<h5 class="text-success">Available</h5>
<a href="/booking/bookid={{$item->id}}">Book Now</a>
@elseif( $item->available == 0 || $item->available == 5 )
<h5 class="text-danger">Unavailable</h5>
@elseif( $item->available == 2)
<h5 class="text-primary">Booking Done</h5>
@elseif( $item->available == 3)
<h5 class="text-success">Booking Confirmed
<a href="/myTrip/{{$item->id}}" class='text-primary' data-toggle="tooltip" data-placement="top" title="Show Ride Details"><i class="fa fa-arrow-circle-right"></i></a>
</h5>
@elseif( $item->available == 4)
<h5 class="text-danger">Booking Cancled</h5>
@endif
@endif
</td>
</tr>
@endforeach
@else
<td colspan="10" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
@include('footer')
booking.blade.php
<base href="/public">
@include('header')
<head>
<title>BOOKING</title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header" >
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Car Booking
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Car Booking
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Detail Start -->
<div class="container-fluid pt-5">
@if(session()->has('success'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('success')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase mb-5">{{$car->brand}} {{$car->name}}</h1>
<div class="row align-items-center pb-2">
<div class="col-lg-6 mb-4">
<?php $img = explode(', ',$car->image); ?>
<img class="img-fluid" src="{{$img[0]}}" style="height:300px; width:550px;">
</div>
<div class="col-lg-6 mb-4">
<h4 class="mb-2">${{$car->price}}.00/Day</h4>
<div class="d-flex mb-3">
<h6 class="mr-2">Rating:</h6>
<div class="d-flex align-items-center justify-content-center mb-1">
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star-half-alt text-primary mr-1"></small>
<small>(250)</small>
</div>
</div>
<p> {{$car->desc}}, tempor voluptua sit consetetur sit. Aliquyam diam amet diam et eos sadipscing labore. Clita erat ipsum et lorem et sit, sed stet no labore lorem sit. Sanctus clita duo justo et tempor consetetur takimata eirmod, dolores takimata consetetur invidunt</p>
<div class="d-flex pt-1">
<h6>Share on:</h6>
<div class="d-inline-flex">
<a class="px-2" href=""><i class="fab fa-facebook-f"></i></a>
<a class="px-2" href=""><i class="fab fa-twitter"></i></a>
<a class="px-2" href=""><i class="fab fa-linkedin-in"></i></a>
<a class="px-2" href=""><i class="fab fa-pinterest"></i></a>
</div>
</div>
</div>
</div>
<div class="row mt-n3 mt-lg-0 pb-4">
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-car text-primary mr-2"></i>
<span>Model: {{$car->year}}</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-cogs text-primary mr-2"></i>
<span>{{$car->gear}}</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-road text-primary mr-2"></i>
<span>{{$car->kmpl}}km/liter</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-eye text-primary mr-2"></i>
<span>{{$car->features}}</span>
</div>
</div>
</div>
</div>
<!-- Detail End -->
<!-- Car Booking Start -->
<div class="container-fluid pb-5">
<div class="container">
<div class="row">
<div class="col-lg-8">
<form action="booking_details" method="post" >
@csrf
<input type="hidden" name="bookid" @if(isset($bookid)) value="{{$bookid}}" @else value="" @endif>
<h2 class="mb-4">Personal Detail</h2>
<div class="mb-5">
<div class="row">
<div class="col-6 form-group">
<select class="custom-select px-4" name="driverSel" id="driverSel" style="height: 50px;">
@if(isset($bookdata))
@foreach($drivers as $driver)
@if($bookdata->driver_id==$driver->id)
<option value="{{ $driver->id }}" selected> {{ $driver->name }}</option>
@endif
@endforeach
@else
<option value="">Select Driver</option>
@foreach($drivers as $driver)
<option value="{{ $driver->id }}" > {{ $driver->name }}</option>
@endforeach
@endif
</select>
</div>
<div class="col-6 form-group">
<input type="text" class="form-control p-4" name="mobile" placeholder="Mobile Number" required="required">
</div>
</div>
</div>
<h2 class="mb-4">Booking Detail</h2>
<div class="mb-5">
<div class="row">
<div class="col-6 form-group">
<select class="custom-select px-4" style="height: 50px;" name="puloc" id="puloc">
@if(isset($bookdata))
@foreach($locations as $loc)
@if($bookdata->puloc==$loc->id)
<option value="{{ $loc->id }}" selected> {{ $loc->area }}</option>
@endif
@endforeach
@else
<option value="">Pickup Location</option>
@foreach($locations as $loc)
<option value="{{$loc->id}}" >{{$loc->area}}</option>
@endforeach
@endif
</select>
</div>
<div class="col-6 form-group">
<select class="custom-select px-4" style="height: 50px;" name="drloc" id="drloc">
@if(isset($bookdata))
@foreach($locations as $loc)
@if($bookdata->droploc==$loc->id)
<option value="{{$loc->id}}" >{{$loc->area}}</option>
@endif
@endforeach
@else
<option selected>Drop Location</option>
@foreach($locations as $loc)
<option value="{{$loc->id}}" >{{$loc->area}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<div class="date" id="date22" data-target-input="nearest">
<input type="text" name="pudate" id="pudate" class="form-control p-4 datetimepicker-input" placeholder="Pickup Date"
data-target="#date22" data-toggle="datetimepicker" @if(isset($bookdata)) value="{{$bookdata->pudate}}" readonly @endif/>
</div>
</div>
<div class="col-6 form-group">
<div class="time" id="time2" data-target-input="nearest">
<input type="text" name="putime" id="putime" class="form-control p-4 datetimepicker-input" placeholder="Pickup Time"
data-target="#time2" data-toggle="datetimepicker" @if(isset($bookdata)) value="{{$bookdata->putime}}" readonly @endif/>
</div>
</div>
</div>
<div class="row">
<div class="col-6 form-group">
<select class="custom-select px-4" style="height: 50px;" name="personAd">
<option value="0" selected>Select Adult</option>
<option value="1">Adult 1</option>
<option value="2">Adult 2</option>
<option value="3">Adult 3</option>
</select>
</div>
<div class="col-6 form-group">
<select class="custom-select px-4" style="height: 50px;" name="personCh">
<option value="0" selected>Select Child</option>
<option value="1">Child 1</option>
<option value="2">Child 2</option>
<option value="3">Child 3</option>
</select>
</div>
</div>
<div class="form-group">
<textarea class="form-control py-3 px-4" name="message" rows="2" placeholder="Special Request" required="required"></textarea>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="bg-secondary p-5 mb-5">
<h2 class="text-primary mb-4">Payment</h2>
<div class="form-group">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" value="cash" name="payment" id="cash">
<label class="custom-control-label" for="cash">Cash</label>
</div>
</div>
<div class="form-group">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" value="upi" name="payment" id="upi">
<label class="custom-control-label" for="upi">UPI</label>
</div>
</div>
<div class="form-group">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" value="googlepay" name="payment" id="googlepay">
<label class="custom-control-label" for="googlepay">Google Pay</label>
</div>
</div>
<div class="form-group mb-4">
<div class="custom-control custom-radio">
<input type="radio" class="custom-control-input" value="bank" name="payment" id="banktransfer">
<label class="custom-control-label" for="banktransfer">Bank Transfer</label>
</div>
</div>
<input type="hidden" name="car_id" value="{{$car->id}}">
{{-- <input type="hidden" name="user_id" value="{{$car->id}}"> cus --}}
<button class="btn btn-block btn-primary py-3" onclick="checking()" type="submit">Reserve Now</button>
</div>
</div>
</div>
</form>
<script>
function checking(){
puloc = document.getElementById('puloc').value;
drloc= document.getElementById('drloc').value;
pudate= document.getElementById('pudate').value;
putime = document.getElementById('putime').value;
driverSel = document.getElementById('driverSel').value;
var varDate = new Date(pudate); //dd-mm-YYYY
var today = new Date();
// console.log(varDate);
// console.log(today);
if(puloc == drloc)
{
alert('Pickup location and Drop location cannot be same');
event.preventDefault();
return false;
}
if(puloc =='' || drloc =='' || pudate=='' || putime=='' || driverSel=='' )
{
alert('Data cannot be blank');
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
</div>
<!-- Car Booking End -->
@include('footer')
car.blade.php
@include('header')
<head>
<title>CAR LIST </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Car Listing
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Car Listing
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Rent A Car Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5">Find Your Car</h1>
<div class="row">
@foreach($cars as $car)
@if($car->status)
<div class="col-lg-4 col-md-6 mb-2">
<div class="rent-item mb-4">
<?php $imgx = explode(', ',$car->image); ?>
<img class="img-fluid mb-4" src="{{$imgx[1]}}" alt="" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4"> {{$car->brand}} {{$car->name}}</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{$car->year}}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{$car->gear}}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{$car->runs}}K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="detail/{{$car->id}}">${{$car->price}}.00/Day</a>
</div>
</div>
@endif
@endforeach
</div>
</div>
</div>
<!-- Rent A Car End -->
<!-- Banner Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="row mx-0">
<div class="col-lg-6 px-0">
<div class="px-5 bg-secondary d-flex align-items-center justify-content-between" style="height: 350px;">
<img class="img-fluid flex-shrink-0 ml-n5 w-50 mr-4" src="img/banner-left.png" alt="">
<div class="text-right">
<h3 class="text-uppercase text-light mb-3">Want to be driver?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="/driver">Start Now</a>
</div>
</div>
</div>
<div class="col-lg-6 px-0">
<div class="px-5 bg-dark d-flex align-items-center justify-content-between" style="height: 350px;">
<div class="text-left">
<h3 class="text-uppercase text-light mb-3">Looking for a car?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="/car">Start Now</a>
</div>
<img class="img-fluid flex-shrink-0 mr-n5 w-50 ml-4" src="img/banner-right.png" alt="">
</div>
</div>
</div>
</div>
</div>
<!-- Banner End -->
@include('footer')
contact.blade.php
@include('header')
<head>
<title>CONTACT </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header" >
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Contact
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Contact
@endif </h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Contact Start -->
<div class="container-fluid py-5">
@if(session()->has('success'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('success')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5">Contact Us</h1>
<div class="row">
<div class="col-lg-7 mb-2">
<div class="contact-form bg-light mb-4" style="padding: 30px;">
<form action="confmac" method="post">
@csrf
<div class="row">
<div class="col-6 form-group">
<input type="text" class="form-control p-4" name="enname" placeholder="Your Name" required="required">
</div>
<div class="col-6 form-group">
<input type="email" class="form-control p-4" name="enemail" placeholder="Your Email" required="required">
</div>
</div>
<div class="form-group">
<input type="text" class="form-control p-4" name="ensubject" placeholder="Subject" required="required">
</div>
<div class="form-group">
<textarea class="form-control py-3 px-4" name="enmsgbdy" rows="5" placeholder="Message" required="required"></textarea>
</div>
<div>
<button class="btn btn-primary py-3 px-5" type="submit">Send Message</button>
</div>
</form>
</div>
</div>
<div class="col-lg-5 mb-2">
<div class="bg-secondary d-flex flex-column justify-content-center px-5 mb-4" style="height: 435px;">
<div class="d-flex mb-3">
<i class="fa fa-2x fa-map-marker-alt text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Head Office</h5>
<p>123 Street, New York, USA</p>
</div>
</div>
<div class="d-flex mb-3">
<i class="fa fa-2x fa-map-marker-alt text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Branch Office</h5>
<p>123 Street, New York, USA</p>
</div>
</div>
<div class="d-flex mb-3">
<i class="fa fa-2x fa-envelope-open text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Customer Service</h5>
<p>customer@example.com</p>
</div>
</div>
<div class="d-flex">
<i class="fa fa-2x fa-envelope-open text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Return & Refund</h5>
<p class="m-0">refund@example.com</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Contact End -->
@include('footer')
detail.blade.php
<base href="/public">
@include('header')
<head>
<title>DETAILS </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header" >
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @else
Car Detail @endif
@else
Car Detail
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @else
Car Detail @endif
@else
Car Detail
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Detail Start -->
<div class="container-fluid pt-5">
@if(session()->has('success'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('success')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="container pt-5">
<div class="row">
<div class="col-lg-8 mb-5">
<h1 class="display-4 text-uppercase mb-5"> {{$car->brand}} {{$car->name}}</h1>
<div class="row mx-n2 mb-3">
<?php $img = explode(', ',$car->image); ?>
<div class="col-md-3 col-6 px-2 pb-2">
<img class="img-fluid w-100" src="{{$img[0]}}" style="height:150px; width:200px;" alt="">
</div>
<div class="col-md-3 col-6 px-2 pb-2">
<img class="img-fluid w-100" src="{{$img[1]}}" style="height:150px; width:200px;" alt="">
</div>
<div class="col-md-3 col-6 px-2 pb-2">
<img class="img-fluid w-100" src="{{$img[2]}}" style="height:150px; width:200px;" alt="">
</div>
<div class="col-md-3 col-6 px-2 pb-2">
<img class="img-fluid w-100" src="{{$img[3]}}" style="height:150px; width:200px;" alt="">
</div>
</div>
<p>{{$car->desc}}. Aliquyam diam amet diam et eos sadipscing labore. Clita erat ipsum et lorem et sit, sed stet no labore lorem sit. Sanctus clita duo justo et tempor consetetur takimata eirmod, dolores takimata consetetur invidunt magna dolores aliquyam dolores dolore. Amet erat amet et magna</p>
<div class="row pt-2">
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-car text-primary mr-2"></i>
<span>Model: {{$car->year}}</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-cogs text-primary mr-2"></i>
<span>{{$car->gear}}</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-road text-primary mr-2"></i>
<span>{{$car->kmpl}}km/liter</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-eye text-primary mr-2"></i>
<span>{{$car->features}}</span>
</div>
<div class="col-md-3 col-6 mb-2">
<i class="fa fa-credit-card text-primary mr-2"></i>
<span>${{$car->price}}.00/Day</span>
</div>
</div>
</div>
<div class="col-lg-4 mb-5">
<div class="bg-secondary p-5">
<h3 class="text-primary text-center mb-4">Check Availability</h3>
<form action="chck_avail" method="post">
@csrf
<input type="hidden" name="car_id" id="car_id" value="{{$car->id}}">
<div class="form-group">
<select name="puloc" id="puloc" class="custom-select px-4" style="height: 50px;">
<option selected>Pickup Location</option>
@foreach($locations as $loc)
<option value="{{$loc->id}}">{{$loc->area}}</option>
@endforeach
</select>
</div>
<div class="form-group">
<select name="drloc" id="drloc" class="custom-select px-4" style="height: 50px;">
<option selected>Drop Location</option>
@foreach($locations as $loc)
<option value="{{$loc->id}}">{{$loc->area}}</option>
@endforeach
</select>
</div>
{{-- <div class="form-group">
<div class="date" id="date12" data-target-input="nearest">
<input type="text" id="pudate" name="pudate" class="form-control p-4 datetimepicker-input" placeholder="Pickup Date"
data-target="#date12" data-toggle="datetimepicker" />
</div>
</div> --}}
<div class="form-group" id="pudateh1">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
<input type="date" id="pudateh" name="pudate"
class="p-4 form-control datetimepicker-input"@if (isset($req)) value="{{ $req->pudate }}" @endif />
</div>
<script language="javascript">
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0');
var yyyy = today.getFullYear();
today = yyyy + '-' + mm + '-' + dd;
$('#pudateh').attr('min',today);
</script>
<div class="form-group">
<div class="time" id="time2" data-target-input="nearest">
<input type="text" id="putime" name="putime" class="form-control p-4 datetimepicker-input" placeholder="Pickup Time"
data-target="#time2" data-toggle="datetimepicker" />
</div>
</div>
<div class="form-group">
<select class="custom-select px-4" name="driverSel" id="driverSel" style="height: 50px;">
<option selected>Select Driver</option>
@foreach($drivers as $driver)
<option value="{{$driver->id}}"> {{$driver->name }}</option>
@endforeach
</select>
</div>
<div class="form-group mb-0">
<button class="btn btn-primary btn-block" onclick="checking()" type="submit" style="height: 50px;">Check Now</button>
</div>
</form>
<script>
function checking(){
puloc = document.getElementById('puloc').value;
drloc= document.getElementById('drloc').value;
pudate= document.getElementById('pudate').value;
putime = document.getElementById('putime').value;
driverSel = document.getElementById('driverSel').value;
var varDate = new Date(pudate); //dd-mm-YYYY
var today = new Date().toLocaleString();
// console.log(varDate);
// console.log(today);
console.log(today, varDate, puloc ,drloc ,pudate,putime, driverSel);
if(puloc == drloc)
{
alert('Pickup location and Drop location cannot be same');
event.preventDefault();
return false;
}
if(puloc =='' || drloc =='' || pudate=='' || putime=='' || driverSel=='' )
{
alert('Data cannot be blank');
event.preventDefault();
return false;
}
return true;
}
</script>
{{-- <div class="form-group mb-0">
<a href="booking/{{$car->id}}" class="btn btn-primary btn-block" style="height: 50px;">Book Now</a>
</div> --}}
</div>
</div>
</div>
</div>
</div>
<!-- Detail End -->
<!-- Related Car Start -->
<div class="container-fluid pb-5">
<div class="container pb-5">
<h2 class="mb-4">Related Cars</h2>
<div class="owl-carousel related-carousel position-relative" style="padding: 0 30px;">
{{-- loop starts here --}}
@foreach($relatedcars as $rcar)
<div class="rent-item">
<?php $carImg = explode(', ',$rcar->image); ?>
<img class="img-fluid mb-4" src="{{$carImg[2]}}" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4"> {{$rcar->brand}} {{$rcar->name}}</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{$rcar->year}}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{$rcar->gear}}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{$rcar->runs}}K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="detail/{{$rcar->id}}">${{$rcar->price}}.00/Day</a>
</div>
@endforeach
{{-- loop stops here --}}
{{-- <div class="rent-item">
<img class="img-fluid mb-4" src="img/car-rent-2.png" alt="">
<h4 class="text-uppercase mb-4">Mercedes Benz R3</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>2015</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>AUTO</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>25K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="">$99.00/Day</a>
</div>
<div class="rent-item">
<img class="img-fluid mb-4" src="img/car-rent-3.png" alt="">
<h4 class="text-uppercase mb-4">Mercedes Benz R3</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>2015</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>AUTO</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>25K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="">$99.00/Day</a>
</div>
<div class="rent-item">
<img class="img-fluid mb-4" src="img/car-rent-4.png" alt="">
<h4 class="text-uppercase mb-4">Mercedes Benz R3</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>2015</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>AUTO</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>25K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="">$99.00/Day</a>
</div> --}}
</div>
</div>
</div>
<!-- Related Car End -->
@include('footer')
driverProfile.blade.php
<base href="/public">
@include('header')
<head>
<title>DETAILS </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header" >
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @else
Car Detail @endif
@else
Car Detail
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @else
Car Detail @endif
@else
Car Detail
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<div class="row my-5" >
<div class="col-sm-10 col-md-10 mx-auto ">
<div class="row mx-auto">
<div class="mx-auto col-md-6">
<div class="mx-2">
<h1 class="text-info ">Driver Account</h1>
<h6 class="text-muted mt-2"> Drivers are most trustworthy, loyal and geniune persons. <br> Trust Us and make your next ride being a King, and<br>
<strong> The information associated with your Royal Car are real and helful. </strong>
</h6>
{{-- your new password the next time you sign in. --}}
<div class="mt-5 pt-5 d-flex justify-content-center align-items-center">
<img src="{{$data->image}}" style=" border: 4px solid #cddc39; padding: 2px; border-radius: 50%; border-top-color: #ff5722; border-left-color: #ff5722; width: 25%;height: 15%;">
</div>
<div class="my-2 mb-5 text-muted text-center">Recent Image</div>
</div>
</div>
<div class="mx-auto col-md-6">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Account </strong>
</div>
<div class="card-body">
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Username </label>
</div>
<div class="col-12 col-md-8">
<input type="text" name="name" id="name" placeholder="Username" value="{{ $data->name }}" class="form-control" disabled>
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Email Address </label>
</div>
<div class="col-12 col-md-8">
<input type="email" name="email" id="email" placeholder="Email" value="{{ $data->email }}" class="form-control" disabled>
</div>
</div>
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Phone </label>
</div>
<div class="col-12 col-md-8">
<input type="number" id="file-input" name="phone" class="form-control" value="{{ $data->phone }}" disabled >
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Address </label>
</div>
<div class="col-12 col-md-8">
<input type="text" id="file-input" name="address" class="form-control" value="{{ $data->address }}" disabled>
</div>
</div>
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Licence No </label>
</div>
<div class="col-12 col-md-8">
<input type="text" id="file-input" name="licenceNo" class="form-control" value="{{ $data->licenceNo }}" disabled>
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Car No </label>
</div>
<div class="col-12 col-md-8">
<input type="" id="file-input" name="carNo" class="form-control" value="{{ $data->carNo }}" disabled>
</div>
</div>
<div class="row ">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Years of Experience </label>
</div>
<div class="col-12 col-md-8">
<select name="experience" class="form-control" aria-label="Default select example" disabled>
<option value="">-- Select --</option>
<option value="1" @if($data->experience==1) selected @endif>1</option>
<option value="2" @if($data->experience==2) selected @endif>2</option>
<option value="3" @if($data->experience==3) selected @endif>3</option>
<option value="5" @if($data->experience==5) selected @endif>5</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>@include('footer')
footer.blade.php
<!-- Vendor Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="owl-carousel vendor-carousel">
<div class="bg-light p-4">
<img src="img/vendor-1.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-2.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-3.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-4.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-5.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-6.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-7.png" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-8.png" alt="">
</div>
</div>
</div>
</div>
<!-- Vendor End -->
<!-- Footer Start -->
<div class="container-fluid bg-secondary py-5 px-sm-3 px-md-5" style="margin-top: 90px;">
<div class="row pt-5">
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Get In Touch</h4>
<p class="mb-2"><i class="fa fa-map-marker-alt text-white mr-3"></i>123 Street, New York, USA</p>
<p class="mb-2"><i class="fa fa-phone-alt text-white mr-3"></i>+012 345 67890</p>
<p><i class="fa fa-envelope text-white mr-3"></i>info@example.com</p>
<h6 class="text-uppercase text-white py-2">Follow Us</h6>
<div class="d-flex justify-content-start">
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-linkedin-in"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square" href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Usefull Links</h4>
<div class="d-flex flex-column justify-content-start">
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Private Policy</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Term & Conditions</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>New Member Registration</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Affiliate Programme</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Return & Refund</a>
<a class="text-body" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Help & FQAs</a>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Car Gallery</h4>
<div class="row mx-n1">
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-1.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-2.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-3.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-4.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-5.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-6.jpg" alt=""></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Newsletter</h4>
<p class="mb-4">Volup amet magna clita tempor. Tempor sea eos vero ipsum. Lorem lorem sit sed elitr sed kasd et</p>
<div class="w-100 mb-3">
<div class="input-group">
<input type="text" class="form-control bg-dark border-dark" style="padding: 25px;" placeholder="Your Email">
<div class="input-group-append">
<button class="btn btn-primary text-uppercase px-3">Sign Up</button>
</div>
</div>
</div>
<i>Lorem sit sed elitr sed kasd et</i>
</div>
</div>
</div>
<div class="container-fluid bg-dark py-4 px-sm-3 px-md-5">
<p class="mb-2 text-center text-body">© <a href="#">Your Site Name</a>. All Rights Reserved.</p>
<p class="m-0 text-center text-body">Designed by <a href="https://htmlcodex.com">HTML Codex</a></p>
</div>
<!-- Footer End -->
<!-- Back to Top -->
<a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="fa fa-angle-double-up"></i></a>
<!-- JavaScript Libraries -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"></script>
<script src="lib/easing/easing.min.js"></script>
<script src="lib/waypoints/waypoints.min.js"></script>
<script src="lib/owlcarousel/owl.carousel.min.js"></script>
<script src="lib/tempusdominus/js/moment.min.js"></script>
<script src="lib/tempusdominus/js/moment-timezone.min.js"></script>
<script src="lib/tempusdominus/js/tempusdominus-bootstrap-4.min.js"></script>
<!-- Template Javascript -->
<script src="js/main.js"></script>
</body>
</html>
header.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="Free HTML Templates" name="keywords">
<meta content="Free HTML Templates" name="description">
<!-- Favicon -->
<link href="img/favicon.png" rel="icon">
<!-- Google Web Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Rubik&display=swap"
rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css" rel="stylesheet">
<!-- Libraries Stylesheet -->
<link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />
<!-- Customized Bootstrap Stylesheet -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Template Stylesheet -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- Topbar Start -->
<div class="container-fluid bg-dark py-3 px-lg-5 d-none d-lg-block">
<div class="row">
<div class="col-md-6 text-center text-lg-left mb-2 mb-lg-0">
<div class="d-inline-flex align-items-center">
<a class="text-body pr-3" href=""><i class="fa fa-phone-alt mr-2"></i>+012 345 6789</a>
<span class="text-body">|</span>
<a class="text-body px-3" href=""><i class="fa fa-envelope mr-2"></i>info@example.com</a>
</div>
</div>
<div class="col-md-6 text-center text-lg-right">
<div class="d-inline-flex align-items-center" >
@if (session()->has('adeu'))
<span> Welcome
{{ session()->get('adeu')['name'] }},
</span>
@endif
<a class="text-body px-3" href="driver"> Drive with Us</a>
<span class="text-body">|</span>
<a class="text-body px-3" href="">
<i class="fab fa-facebook-f"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-twitter"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-linkedin-in"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-instagram"></i>
</a>
<a class="text-body pl-3" href="">
<i class="fab fa-youtube"></i>
</a>
{{-- <span class="text-body px-3">|</span>
<a class="text-body px-1" data-toggle="modal" data-target="#exampleModal">
<i class="fa fa-search" aria-hidden="true"></i>
Search</a> --}}
</div>
</div>
</div>
</div>
<!-- Topbar End -->
<!-- Navbar Start -->
<div class="container-fluid position-relative nav-bar p-0">
<div class="position-relative px-lg-5" style="z-index: 9;">
<nav class="navbar navbar-expand-lg bg-secondary navbar-dark py-3 py-lg-0 pl-3 pl-lg-5">
<a href="/" class="navbar-brand">
<h1 class="text-uppercase text-primary mb-1">Royal Cars</h1>
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-between px-3" id="navbarCollapse">
<div class="navbar-nav ml-auto py-0">
<a href="/" class="nav-item nav-link">Home</a>
<a href="/about" class="nav-item nav-link ">About</a>
<a href="/service" class="nav-item nav-link">Service</a>
<div class="nav-item">
<a href="/car" class="nav-item nav-link">Cars</a>
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Pages</a>
<div class="dropdown-menu rounded-0 m-0">
<a href="/team" class="dropdown-item">The Team</a>
<a href="/testimonial" class="dropdown-item">Testimonial</a>
</div>
</div>
<a href="contact" class="nav-item nav-link">Contact</a>
@if (session()->has('adeu'))
<a href="/adindex" class="nav-item nav-link">Dashboard</a>
<a href="/adlogout" class="nav-item nav-link">Logout</a>
@else
<a href="/adlogin" class="nav-item nav-link">Login</a>
@endif
</div>
</div>
</nav>
</div>
</div>
<!-- Navbar End search_avail -->
<!-- Search Start -->
<div class="container-fluid bg-white pt-3 px-lg-5">
<form action="srchFromAvai" method="post">
@csrf
<div class="row mx-n2">
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select name="puloc" id="puloch" class="custom-select px-4 mb-3" style="height: 50px;">
<option value="" selected>Pickup Location</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
@if (isset($req)) @if ($req->puloc == $loc->id) selected @endif
@endif>{{ $loc->area }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select name="drloc" id="drloch" class="custom-select px-4 mb-3" style="height: 50px;">
<option value="" selected>Drop Location</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
@if (isset($req)) @if ($req->drloc == $loc->id) selected @endif
@endif>{{ $loc->area }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6" id="pudateh1">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
<input type="date" id="pudateh22" name="pudate"
class="p-4 form-control "@if (isset($req)) value="{{ $req->pudate }}" @endif />
</div>
<script language="javascript">
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0');
var yyyy = today.getFullYear();
today = yyyy + '-' + mm + '-' + dd;
$('#pudateh22').attr('min',today);
</script>
{{-- <div class="col-xl-2 col-lg-4 col-md-6">
<div class="time mb-3" id="time1" data-target-input="nearest">
<input type="text" id="putimeh" name="putime" class="form-control p-4 datetimepicker-input" placeholder="Time Pickup "
data-target="#time1" data-toggle="datetimepicker" />
</div>
</div> --}}
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select class="custom-select px-4 mb-3" style="height: 50px;" name="car_id" id="car_idh">
<option value="" selected>Select A Car</option>
@foreach ($cars as $car)
<option value="{{ $car->id }}"
@if (isset($req)) @if ($req->car_id == $car->id) selected @endif
@endif> {{ $car->name }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select class="custom-select px-4 mb-3" style="height: 50px;" name="driverSel" id="driverSelh">
<option value="" selected>Driver</option>
@foreach ($drivers as $driver)
<option value="{{ $driver->id }}"
@if (isset($req)) @if ($req->driverSel == $driver->id) selected @endif
@endif> {{ $driver->name }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2 mx-auto" onclick="checking2()">
<button class="btn btn-primary btn-block mb-3" type="submit" style="height: 50px;">Search Now</button>
</div>
</div>
</form>
<script>
function checking2() {
puloc = document.getElementById('puloch').value;
drloc = document.getElementById('drloch').value;
pudate = document.getElementById('pudateh').value;
putime = document.getElementById('putimeh').value;
carSel = document.getElementById('car_idh').value;
driverSel = document.getElementById('driverSelh').value;
var varDate = new Date(pudate); //dd-mm-YYYY
var today = new Date();
// console.log(puloc ,drloc ,pudate,putime, driverSel, carSel);
// if(puloc == drloc)
// {
// alert('Pickup location and Drop location cannot be same');
// event.preventDefault();
// return false;
// }
if (pudate == '') {
alert('Date cannot be blank');
event.preventDefault();
return false;
}
if (varDate <= today) {
alert("Please check car for Present Date or for some Upcoming Event!");
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
<!-- Search End -->
@if (isset($page))
@if ($page->active)
@if ($page->page != 'home')
<style>
.page-header {
height: 400px;
margin-bottom: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(rgba(28, 30, 50, .8), rgba(28, 30, 50, .8)), url({{ $page->image }});
background-attachment: fixed;
}
.bg-banner {
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url({{ $page->image }});
background-attachment: fixed;
}
</style>
@else
<?php $arr = explode(', ', $page->image); ?>
<style>
.bg-banner {
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url({{ $arr[0] }});
background-attachment: fixed;
}
</style>
@endif
@else
<style>
.page-header {
height: 400px;
margin-bottom: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url(../img/no_image_available.jpeg);
background-attachment: fixed;
}
.bg-banner {
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url(../img/no_image_available.jpeg);
background-attachment: fixed;
}
</style>
@endif
@else
<style>
.page-header {
height: 400px;
margin-bottom: 90px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url(../img/no_image_available.jpeg);
background-attachment: fixed;
}
.bg-banner {
background: linear-gradient(rgba(28, 30, 50, .9), rgba(28, 30, 50, .9)), url(../img/no_image_available.jpeg);
background-attachment: fixed;
}
</style>
@endif
index.blade.php
@include('header')
<head>
<title>ROYAL CARS - Car Rental HTML Template</title>
</head>
<!-- Carousel Start -->
<div class="container-fluid p-0" style="margin-bottom: 90px;">
<div id="header-carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
@if(isset($page))
@if($page->active==1)
<?php $arr = explode(", ",$page->image); $count=1; ?>
@foreach($arr as $card)
{{-- <img src="{{$card}}" alt="{{$page->title}} banner" height="60px" width="70px">--}}
<div @if($count==1) class="active carousel-item" @else class="carousel-item" @endif>
<img class="w-100" src="{{$card}}" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">{{$page->title}}</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div>
<?php $count++; ?>
@endforeach
@else
<div class="carousel-item active">
<img class="w-100" src="img/carousel-1.jpg" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">Quality Cars with Unlimited Miles</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div>
<div class="carousel-item">
<img class="w-100" src="img/carousel-2.jpg" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">Quality Cars with Unlimited Miles</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div>
@endif
@else
<div class="carousel-item active">
<img class="w-100" src="img/carousel-1.jpg" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">Quality Cars with Unlimited Miles</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div>
<div class="carousel-item">
<img class="w-100" src="img/carousel-2.jpg" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">Quality Cars with Unlimited Miles</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div>
@endif
{{-- <div class="carousel-item active">
<img class="w-100" src="img/carousel-2.jpg" alt="Image" id="indexcarbg1">
<div class="carousel-caption d-flex flex-column align-items-center justify-content-center">
<div class="p-3" style="max-width: 900px;">
<h4 class="text-white text-uppercase mb-md-3">Rent A Car</h4>
<h1 class="display-1 text-white mb-md-4">Quality Cars with Unlimited Miles</h1>
<a href="" class="btn btn-primary py-md-3 px-md-5 mt-2">Reserve Now</a>
</div>
</div>
</div> --}}
</div>
<a class="carousel-control-prev" href="#header-carousel" data-slide="prev">
<div class="btn btn-dark" style="width: 45px; height: 45px;">
<span class="carousel-control-prev-icon mb-n2"></span>
</div>
</a>
<a class="carousel-control-next" href="#header-carousel" data-slide="next">
<div class="btn btn-dark" style="width: 45px; height: 45px;">
<span class="carousel-control-next-icon mb-n2"></span>
</div>
</a>
</div>
</div>
<!-- Carousel End -->
<!-- About Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-1 text-primary text-center">01</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Welcome To <span class="text-primary">Royal Cars</span></h1>
<div class="row justify-content-center">
<div class="col-lg-10 text-center">
<img class="w-75 mb-4" src="img/about.png" alt="">
<p>Justo et eos et ut takimata sed sadipscing dolore lorem, et elitr labore labore voluptua no rebum sed, stet voluptua amet sed elitr ea dolor dolores no clita. Dolores diam magna clita ea eos amet, amet rebum voluptua vero vero sed clita accusam takimata. Nonumy labore ipsum sea voluptua sea eos sit justo, no ipsum sanctus sanctus no et no ipsum amet, tempor labore est labore no. Eos diam eirmod lorem ut eirmod, ipsum diam sadipscing stet dolores elitr elitr eirmod dolore. Magna elitr accusam takimata labore, et at erat eirmod consetetur tempor eirmod invidunt est, ipsum nonumy at et.</p>
</div>
</div>
<div class="row mt-3">
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-light p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-headset text-secondary"></i>
</div>
<h4 class="text-uppercase m-0">24/7 Car Rental Support</h4>
</div>
</div>
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-secondary p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-car text-secondary"></i>
</div>
<h4 class="text-light text-uppercase m-0">Car Reservation Anytime</h4>
</div>
</div>
<div class="col-lg-4 mb-2">
<div class="d-flex align-items-center bg-light p-4 mb-4" style="height: 150px;">
<div class="d-flex align-items-center justify-content-center flex-shrink-0 bg-primary ml-n4 mr-4" style="width: 100px; height: 100px;">
<i class="fa fa-2x fa-map-marker-alt text-secondary"></i>
</div>
<h4 class="text-uppercase m-0">Lots Of Pickup Locations</h4>
</div>
</div>
</div>
</div>
</div>
<!-- About End -->
<!-- Services Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-1 text-primary text-center">02</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Our Services</h1>
<div class="row">
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-taxi text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">01</h1>
</div>
<h4 class="text-uppercase mb-3">Car Rental</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item active d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-money-check-alt text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">02</h1>
</div>
<h4 class="text-uppercase mb-3">Car Financing</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-car text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">03</h1>
</div>
<h4 class="text-uppercase mb-3">Car Inspection</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-cogs text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">04</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Repairing</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-spray-can text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">05</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Painting</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-pump-soap text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">06</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Cleaning</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
</div>
</div>
</div>
<!-- Services End -->
<!-- Banner Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="bg-banner py-5 px-4 text-center">
<div class="py-5">
<h1 class="display-1 text-uppercase text-primary mb-4">50% OFF</h1>
<h1 class="text-uppercase text-light mb-4">Special Offer For New Members</h1>
<p class="mb-4">Only for Sunday from 1st Jan to 30th Jan 2045</p>
<a class="btn btn-primary mt-2 py-3 px-5" href="">Register Now</a>
</div>
</div>
</div>
</div>
<!-- Banner End -->
<!-- Rent A Car Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-1 text-primary text-center">03</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Find Your Car</h1>
<div class="row">
{{-- ADD DYNAMIC CODE HERE --}}
@if(isset($cars))
<?php $c=1; ?>
@foreach($cars as $car)
<div class="col-lg-4 col-md-6 mb-2">
<div @if($c==2) class="active rent-item mb-4" @else class="rent-item mb-4" @endif>
<?php $img = explode(',', $car->image); $c++; ?>
<img class="img-fluid mb-4" src="{{$img[$c%3]}}" alt="" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4">{{$car->brand }} {{$car->name}}</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{$car->year}} </span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{$car->gear}}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{$car->runs}} K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="detail/{{$car->id}}">$ {{$car->price}}.00/Day</a>
</div>
</div>
@endforeach
{{-- ends DYNAMIC CODE HERE --}}
@else
<div class="col-lg-4 col-md-6 mb-2">
<div class="rent-item mb-4">
<img class="img-fluid mb-4" src="img/no_image_available.jpeg" alt="" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4">NO CARS AVAILABLE</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>YEAR</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>GEAR</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>RUNS K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="">$00.00/Day</a>
</div>
</div>
@endif
<div class="mx-auto">
<a href="/car" class="btn btn-primary px-3" href="">SHOW MORE</a>
</div>
{{-- ends DYNAMIC CODE HERE --}}
</div>
</div>
</div>
<!-- Rent A Car End -->
<!-- Team Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<h1 class="display-1 text-primary text-center">04</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Meet Our Team</h1>
<div class="owl-carousel team-carousel position-relative" style="padding: 0 30px;">
@foreach($drivers as $driver)
<div class="team-item">
<a href="/driverProfile/{{$driver->id}}">
<img class="img-fluid w-100" src="{{$driver->image}}" style="height:270px" alt="">
</a>
<div class="position-relative py-4">
<h4 class="text-uppercase">{{$driver->name}}</h4>
<p class="m-0">Experience: {{$driver->experience}}</p>
<div class="team-social position-absolute w-100 h-100 d-flex align-items-center justify-content-center">
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
@endforeach
<div class="team-item">
<img class="img-fluid w-100" src="img/team-2.jpg" alt="">
<div class="position-relative py-4">
<h4 class="text-uppercase">Sing Queen</h4>
<p class="m-0">Experience: 2</p>
<div class="team-social position-absolute w-100 h-100 d-flex align-items-center justify-content-center">
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Team End -->
<!-- Banner Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="row mx-0">
<div class="col-lg-6 px-0">
<div class="px-5 bg-secondary d-flex align-items-center justify-content-between" style="height: 350px;">
<img class="img-fluid flex-shrink-0 ml-n5 w-50 mr-4" src="img/banner-left.png" alt="">
<div class="text-right">
<h3 class="text-uppercase text-light mb-3">Want to be driver?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="driver">Start Now</a>
</div>
</div>
</div>
<div class="col-lg-6 px-0">
<div class="px-5 bg-dark d-flex align-items-center justify-content-between" style="height: 350px;">
<div class="text-left">
<h3 class="text-uppercase text-light mb-3">Looking for a car?</h3>
<p class="mb-4">Lorem justo sit sit ipsum eos lorem kasd, kasd labore</p>
<a class="btn btn-primary py-2 px-4" href="car">Start Now</a>
</div>
<img class="img-fluid flex-shrink-0 mr-n5 w-50 ml-4" src="img/banner-right.png" alt="">
</div>
</div>
</div>
</div>
</div>
<!-- Banner End -->
<!-- Testimonial Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<h1 class="display-1 text-primary text-center">05</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Our Client's Say</h1>
<div class="owl-carousel testimonial-carousel">
@foreach($testimonials as $t)
<div class="testimonial-item d-flex flex-column justify-content-center px-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<img class="img-fluid ml-n4" src="img/testimonial-1.jpg" alt="">
<h1 class="display-2 text-white m-0 fa fa-quote-right"></h1>
</div>
<h4 class="text-uppercase mb-2">{{ findCustomer($t->book_id)}}</h4>
<i class="mb-2">Rating: <?php for($i = 0; $i < (int)$t->rating; $i++){ ?>
<i class="fa fa-star text-warning "></i>
<?php } ?><br></i>
<p class="m-0">{{$t->message}}</p>
</div>
@endforeach
<div class="testimonial-item d-flex flex-column justify-content-center px-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<img class="img-fluid ml-n4" src="img/testimonial-4.jpg" alt="">
<h1 class="display-2 text-white m-0 fa fa-quote-right"></h1>
</div>
<h4 class="text-uppercase mb-2">PORTAL QUEEN</h4>
<i class="mb-2">Rating: <?php for($i = 0; $i < 3; $i++){ ?>
<i class="fa fa-star text-warning "></i>
<?php } ?><br></i>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
</div>
</div>
<!-- Testimonial End -->
<!-- Contact Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-1 text-primary text-center">06</h1>
<h1 class="display-4 text-uppercase text-center mb-5">Contact Us</h1>
@if(session()->has('success'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('success')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="row">
<div class="col-lg-7 mb-2">
<div class="contact-form bg-light mb-4" style="padding: 30px;">
<form action="clcontact" method="post">
@csrf
<div class="row">
<div class="col-6 form-group">
<input type="text" class="form-control p-4" name="enname" placeholder="Your Name" required="required">
</div>
<div class="col-6 form-group">
<input type="email" class="form-control p-4" name="enemail" placeholder="Your Email" required="required">
</div>
</div>
<div class="form-group">
<input type="text" class="form-control p-4" name="ensubject" placeholder="Subject" required="required">
</div>
<div class="form-group">
<textarea class="form-control py-3 px-4" name="enmsgbdy" rows="5" placeholder="Message" required="required"></textarea>
</div>
<div>
<button class="btn btn-primary py-3 px-5" type="submit">Send Message</button>
</div>
</form>
</div>
</div>
<div class="col-lg-5 mb-2">
<div class="bg-secondary d-flex flex-column justify-content-center px-5 mb-4" style="height: 435px;">
<div class="d-flex mb-3">
<i class="fa fa-2x fa-map-marker-alt text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Head Office</h5>
<p>123 Street, New York, USA</p>
</div>
</div>
<div class="d-flex mb-3">
<i class="fa fa-2x fa-map-marker-alt text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Branch Office</h5>
<p>123 Street, New York, USA</p>
</div>
</div>
<div class="d-flex mb-3">
<i class="fa fa-2x fa-envelope-open text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Customer Service</h5>
<p>customer@example.com</p>
</div>
</div>
<div class="d-flex">
<i class="fa fa-2x fa-envelope-open text-primary flex-shrink-0 mr-3"></i>
<div class="mt-n1">
<h5 class="text-light">Return & Refund</h5>
<p class="m-0">refund@example.com</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Contact End -->
@include('footer')
mailsend.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h3> {{ $data['name'] }} </h3>
Thank u
we got the mail
</body>
</html>
searchResults.blade.php
{{-- @include('header')
<head>
<title>SEARCH </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h6>
</div>
</div>
<!-- Page Header Start - ->
<!-- Services Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5"> Available Cars </h1>
<div class="row">
{{-- ['cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'availCars'=> $availCars, 'availDrivers'=> $availDrivers] - -}}
@if (isset($availCars))
<?php $c = 1; ?>
@foreach ($availCars as $rcar)
<div class="col-lg-4 col-md-6 mb-2">
<div
@if ($c == 2) class="active service-item d-flex flex-column justify-content-center px-4 mb-4" @else class="service-item d-flex flex-column justify-content-center px-4 mb-4" @endif>
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4"
style="width: 150px; height: 100px;">
<?php $carImg = explode(', ', $rcar->image); ?>
<img class="img-fluid mb-4" src="{{ $carImg[2] }}"
style="width:100%; height:100%">
</div>
<h1 class="display-2 text-white mt-n2 m-0">{{ $c++ }}</h1>
</div>
<h4 class="text-uppercase mb-3"> {{ $rcar->brand }} {{ $rcar->name }}</h4>
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{ $rcar->year }}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{ $rcar->gear }}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{ $rcar->runs }}K</span>
</div>
<a class="btn btn-primary px-3"
href="detail/{{ $rcar->id }}">${{ $rcar->price }}.00/Day</a>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>
<!-- Services End - ->
<!-- Services Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5"> Available Drivers </h1>
<div class="row">
{{-- ['cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'availCars'=> $availCars, 'availDrivers'=> $availDrivers] - -}}
@if (isset($availDrivers))
<?php $c = 1; ?>
@foreach ($availDrivers as $rdr)
<div class="col-lg-4 col-md-6 mb-2">
<div
@if ($c == 2) class="active service-item d-flex flex-column justify-content-center px-4 mb-4" @else class="service-item d-flex flex-column justify-content-center px-4 mb-4" @endif>
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4"
style="width: 150px; height: 100px;">
<img class="img-fluid mb-4" src="{{ $rdr->image }}"
style="width:100%; height:100%">
</div>
<h1 class="display-2 text-white mt-n2 m-0">{{ $c++ }}</h1>
</div>
<h4 class="text-uppercase mb-3"> {{ $rdr->name }}</h4>
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span> Experience: {{ $rdr->experience }}</span>
</div>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div>
<!-- Services End -->
<!-- Related Car Start -->
<div class="container-fluid pb-5">
<div class="container pb-5">
<h2 class="mb-4">Related Cars</h2>
<div class="owl-carousel related-carousel position-relative" style="padding: 0 30px;">
{{-- loop starts here - -}}
@foreach ($cars as $rcar)
<div class="rent-item">
<?php $carImg = explode(', ', $rcar->image); ?>
<img class="img-fluid mb-4" src="{{ $carImg[2] }}" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4"> {{ $rcar->brand }} {{ $rcar->name }}</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{ $rcar->year }}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{ $rcar->gear }}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{ $rcar->runs }}K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="detail/{{ $rcar->id }}">${{ $rcar->price }}.00/Day</a>
</div>
@endforeach
</div>
</div>
</div>
<!-- Related Car End -->
@include('footer') --}}
service.blade.php
@include('header')
<head>
<title>SERVICE </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Service
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Service
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Services Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5">Our Services</h1>
<div class="row">
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-taxi text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">01</h1>
</div>
<h4 class="text-uppercase mb-3">Car Rental</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item active d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-money-check-alt text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">02</h1>
</div>
<h4 class="text-uppercase mb-3">Car Financing</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-car text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">03</h1>
</div>
<h4 class="text-uppercase mb-3">Car Inspection</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-cogs text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">04</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Repairing</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-spray-can text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">05</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Painting</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
<div class="col-lg-4 col-md-6 mb-2">
<div class="service-item d-flex flex-column justify-content-center px-4 mb-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4" style="width: 80px; height: 80px;">
<i class="fa fa-2x fa-pump-soap text-secondary"></i>
</div>
<h1 class="display-2 text-white mt-n2 m-0">06</h1>
</div>
<h4 class="text-uppercase mb-3">Auto Cleaning</h4>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
</div>
</div>
</div>
<!-- Services End -->
<!-- Banner Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<div class="bg-banner py-5 px-4 text-center">
<div class="py-5">
<h1 class="display-1 text-uppercase text-primary mb-4">50% OFF</h1>
<h1 class="text-uppercase text-light mb-4">Special Offer For New Members</h1>
<p class="mb-4">Only for Sunday from 1st Jan to 30th Jan 2045</p>
<a class="btn btn-primary mt-2 py-3 px-5" href="">Register Now</a>
</div>
</div>
</div>
</div>
<!-- Banner End -->
@include('footer')
srchFromAvai.blade.php
@include('header')
<head>
<title>SEARCH </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if (isset($page))
@if ($page->active)
{{ $page->title }}
@endif
@else
Search
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Services Start -->
{{-- <div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5"> Available Cars </h1>
<div class="row">
{{-- ['cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'availCars'=> $availCars, 'availDrivers'=> $availDrivers] - -}}
@if (isset($availCars))
<?php $c = 1; ?>
@foreach ($availCars as $rcar)
<div class="col-lg-4 col-md-6 mb-2">
<div
@if ($c == 2) class="active service-item d-flex flex-column justify-content-center px-4 mb-4" @else class="service-item d-flex flex-column justify-content-center px-4 mb-4" @endif>
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4"
style="width: 150px; height: 100px;">
<?php $carImg = explode(', ', $rcar->image); ?>
<img class="img-fluid mb-4" src="{{ $carImg[2] }}"
style="width:100%; height:100%">
</div>
<h1 class="display-2 text-white mt-n2 m-0">{{ $c++ }}</h1>
</div>
<h4 class="text-uppercase mb-3"> {{ $rcar->brand }} {{ $rcar->name }}</h4>
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{ $rcar->year }}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{ $rcar->gear }}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{ $rcar->runs }}K</span>
</div>
<a class="btn btn-primary px-3"
href="detail/{{ $rcar->id }}">${{ $rcar->price }}.00/Day</a>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div> --}}
<!-- Services End -->
{{--
<!-- Services Start -->
<div class="container-fluid py-5">
<div class="container pt-5 pb-3">
<h1 class="display-4 text-uppercase text-center mb-5"> Available Drivers </h1>
<div class="row">
{{-- ['cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'availCars'=> $availCars, 'availDrivers'=> $availDrivers] --}}
@if (isset($availDrivers))
<?php $c = 1; ?>
@foreach ($availDrivers as $rdr)
<div class="col-lg-4 col-md-6 mb-2">
<div
@if ($c == 2) class="active service-item d-flex flex-column justify-content-center px-4 mb-4" @else class="service-item d-flex flex-column justify-content-center px-4 mb-4" @endif>
<div class="d-flex align-items-center justify-content-between mb-3">
<div class="d-flex align-items-center justify-content-center bg-primary ml-n4"
style="width: 150px; height: 100px;">
<img class="img-fluid mb-4" src="{{ $rdr->image }}"
style="width:100%; height:100%">
</div>
<h1 class="display-2 text-white mt-n2 m-0">{{ $c++ }}</h1>
</div>
<h4 class="text-uppercase mb-3"> {{ $rdr->name }}</h4>
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span> Experience: {{ $rdr->experience }}</span>
</div>
</div>
</div>
@endforeach
@endif
</div>
</div>
</div> --}}
<!-- Services End -->
<!-- Related Car Start -->
<div class="container-fluid pb-5">
<div class="container pb-5">
<h2 class="mb-4">Related Cars</h2>
<div class="owl-carousel related-carousel position-relative" style="padding: 0 30px;">
{{-- loop starts here --}}
@foreach ($cars as $rcar)
<div class="rent-item">
<?php $carImg = explode(', ', $rcar->image); ?>
<img class="img-fluid mb-4" src="{{ $carImg[2] }}" style="height:200px; width:500px;">
<h4 class="text-uppercase mb-4"> {{ $rcar->brand }} {{ $rcar->name }}</h4>
<div class="d-flex justify-content-center mb-4">
<div class="px-2">
<i class="fa fa-car text-primary mr-1"></i>
<span>{{ $rcar->year }}</span>
</div>
<div class="px-2 border-left border-right">
<i class="fa fa-cogs text-primary mr-1"></i>
<span>{{ $rcar->gear }}</span>
</div>
<div class="px-2">
<i class="fa fa-road text-primary mr-1"></i>
<span>{{ $rcar->runs }}K</span>
</div>
</div>
<a class="btn btn-primary px-3" href="detail/{{ $rcar->id }}">${{ $rcar->price }}.00/Day</a>
</div>
@endforeach
</div>
</div>
</div>
<!-- Related Car End -->
@include('footer')
team.blade.php
@include('header')
<head>
<title>TEAM </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
The Team
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
The Team
@endif
</h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Team Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<h1 class="display-4 text-uppercase text-center mb-5">Meet Our Team</h1>
<div class="owl-carousel team-carousel position-relative" style="padding: 0 30px;">
@foreach($drivers as $driver)
<div class="team-item">
<a href="/driverProfile/{{$driver->id}}">
<img class="img-fluid w-100" src="{{$driver->image}}" style="height:270px" alt="">
</a>
<div class="position-relative py-4">
<h4 class="text-uppercase">{{$driver->name}}</h4>
<p class="m-0">Experience: {{$driver->experience}}</p>
<div class="team-social position-absolute w-100 h-100 d-flex align-items-center justify-content-center">
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
@endforeach
<div class="team-item">
<img class="img-fluid w-100" src="img/team-2.jpg" alt="">
<div class="position-relative py-4">
<h4 class="text-uppercase">Sing Queen</h4>
<p class="m-0">Experience: 2</p>
<div class="team-social position-absolute w-100 h-100 d-flex align-items-center justify-content-center">
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-primary btn-lg-square mx-1" href="#"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Team End -->
@include('footer')
testimonial.blade.php
@include('header')
<head>
<title>TESTIMONIAL </title>
</head>
<!-- Page Header Start -->
<div class="container-fluid page-header">
<h1 class="display-3 text-uppercase text-white mb-3">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Testimonial
@endif
</h1>
<div class="d-inline-flex text-white">
<h6 class="text-uppercase m-0"><a class="text-white" href="">Home</a></h6>
<h6 class="text-body m-0 px-3">/</h6>
<h6 class="text-uppercase text-body m-0">
@if(isset($page)) @if($page->active)
{{$page->title}} @endif
@else
Testimonial
@endif </h6>
</div>
</div>
<!-- Page Header Start -->
<!-- Testimonial Start -->
<div class="container-fluid py-5">
<div class="container py-5">
<h1 class="display-4 text-uppercase text-center mb-5">Our Client's Say</h1>
<div class="owl-carousel testimonial-carousel">
@foreach($testimonials as $t)
<div class="testimonial-item d-flex flex-column justify-content-center px-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<img class="img-fluid ml-n4" src="img/testimonial-1.jpg" alt="">
<h1 class="display-2 text-white m-0 fa fa-quote-right"></h1>
</div>
<h4 class="text-uppercase mb-2">{{ findCustomer($t->book_id)}}</h4>
<i class="mb-2">Rating: <?php for($i = 0; $i < (int)$t->rating; $i++){ ?>
<i class="fa fa-star text-warning "></i>
<?php } ?><br></i>
<p class="m-0">{{$t->message}}</p>
</div>
@endforeach
<div class="testimonial-item d-flex flex-column justify-content-center px-4">
<div class="d-flex align-items-center justify-content-between mb-3">
<img class="img-fluid ml-n4" src="img/testimonial-4.jpg" alt="">
<h1 class="display-2 text-white m-0 fa fa-quote-right"></h1>
</div>
<h4 class="text-uppercase mb-2">PORTAL QUEEN</h4>
<i class="mb-2">Rating: <?php for($i = 0; $i < 3; $i++){ ?>
<i class="fa fa-star text-warning "></i>
<?php } ?><br></i>
<p class="m-0">Kasd dolor no lorem nonumy sit labore tempor at justo rebum rebum stet, justo elitr dolor amet sit sea sed</p>
</div>
</div>
</div>
</div>
<!-- Testimonial End -->
@include('footer')
Driver view files
account.blade.php
@include('driver.header')
<head>
<title>Driver Login </title>
</head>
{{-- carousel --}}
<div class="row my-5" >
<div class="col-sm-10 col-md-10 mx-auto ">
<div class="row mx-auto">
<div class="mx-auto col-md-6">
<div class="mx-2">
<h1 class="text-info ">My Account</h1>
<h6 class="text-muted mt-2"> You're almost done. <br> Make sure you've saved your work, and<br>
<strong> The information associated with your Royal Car still exists. </strong>
</h6>
{{-- your new password the next time you sign in. --}}
<div class="mt-5 pt-5 d-flex justify-content-center align-items-center">
<img src="{{$data->image}}" style=" border: 4px solid #cddc39; padding: 2px; border-radius: 50%; border-top-color: #ff5722; border-left-color: #ff5722; width: 25%;height: 15%;">
</div>
<div class="my-2 mb-5 text-muted text-center">Recent Image</div>
</div>
</div>
<div class="mx-auto col-md-6">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Account </strong>
</div>
<div class="card-body">
<form action="/driver_update" method="post" id="basic-form" enctype="multipart/form-data">
@csrf
<input type="hidden" name="adid" value="{{ $data->id }}">
<input type="hidden" name="old_img" value="{{ $data->image }}">
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Username </label>
</div>
<div class="col-12 col-md-8">
<input type="text" name="name" id="name" placeholder="Username" value="{{ $data->name }}" class="form-control">
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Email Address </label>
</div>
<div class="col-12 col-md-8">
<input type="email" name="email" id="email" placeholder="Email" value="{{ $data->email }}" class="form-control" >
</div>
</div>
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Phone </label>
</div>
<div class="col-12 col-md-8">
<input type="number" id="file-input" name="phone" class="form-control" value="{{ $data->phone }}" >
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Address </label>
</div>
<div class="col-12 col-md-8">
<input type="text" id="file-input" name="address" class="form-control" value="{{ $data->address }}" >
</div>
</div>
<div class="row">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Licence No </label>
</div>
<div class="col-12 col-md-8">
<input type="text" id="file-input" name="licenceNo" class="form-control" value="{{ $data->licenceNo }}" >
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Car No </label>
</div>
<div class="col-12 col-md-8">
<input type="" id="file-input" name="carNo" class="form-control" value="{{ $data->carNo }}">
</div>
</div>
<div class="row ">
<div class="col col-md-4">
<label for="file-input" class=" form-control-label"> Years of Experience </label>
</div>
<div class="col-12 col-md-8">
<select name="experience" class="form-select" aria-label="Default select example">
<option value="">-- Select --</option>
<option value="1" @if($data->experience==1) selected @endif>1</option>
<option value="3" @if($data->experience==3) selected @endif>3</option>
<option value="5" @if($data->experience==5) selected @endif>5</option>
</select>
</div>
</div>
<div class="row my-2">
<div class="col col-md-4">
<label for="file-multiple-input" class=" form-control-label"> Set New Image</label>
</div>
<div class="col-12 col-md-8">
<input type="file" id="adimg" name="adimg" class="form-control">
</div>
</div>
<button class="form-control btn btn-outline-success" type="submit">Update</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
driver_portal.blade.php
@include('driver.header')
<head>
<title>Driver_Portal</title>
</head>
@include('driver.searchCom')
<div class="container-fluid" >
<div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel" >
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner" style="border:1px solid; border-radius: 10px 50px">
<div class="carousel-item active">
<img src="admin/images/driver/1675302.jpg" class="d-block w-100" alt="..." height="500px" id="indexcarbg1">
<div class="carousel-caption d-none d-md-block">
<h5 class="text-primary">TRANSPORT NETWORK SERVICES</h5>
<p>We’ve developed a fully integrated portal to help you achieve this.</p>
</div>
</div>
<div class="carousel-item">
<img src="admin/images/driver/1675341.jpg" class="d-block w-100" alt="..." height="500px" id="indexcarbg1">
<div class="carousel-caption d-none d-md-block">
<h5 class="text-success">TRACK DRIVER ACCESS AND BEHAVIOUR</h5>
<p>Track driver training, send news, keep up to date driver profiles.</p>
</div>
</div>
<div class="carousel-item">
<img src="admin/images/driver/4037344.jpg" class="d-block w-100" alt="..." height="500px" id="indexcarbg1">
<div class="carousel-caption d-none d-md-block">
<h5 class="text-warning">DRIVER PORTAL</h5>
<p>Safety management compliance tools & tracking for the fleet.</p>
</div>
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleCaptions" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
{{-- carousel ends --}}
<div class="row my-5">
<div class="col-sm-9 col-md-10 mx-auto ">
<div class="d-flex justify-content-around">
<div class="card" style="width: 17rem;">
<img src="img/gallery-1.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Drive For Us</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
<div class="card" style="width: 17rem;">
<img src="img/gallery-1.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Partner With Car</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
<div class="card" style="width: 17rem;">
<img src="img/gallery-1.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Fleet Operator</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
driverRegister.blade.php
@include('driver.header')
<head>
<title>Driver Registration</title>
</head>
{{-- carousel --}}
<div class="row container my-5 mx-auto ">
<div class=" col-md-12">
<div class="d-flex justify-content-center">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Registration </strong>
</div>
<div class="card-body">
<form action="/driver_reg" id="basic-form" method="post" enctype="multipart/form-data" class="form-horizontal">
@csrf
<div class="row">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="name" class="form-control">
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Email</label>
</div>
<div class="col-12 col-md-9">
<input type="email" id="file-input" name="email" class="form-control" >
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" id="file-input" name="password" class="form-control" >
</div>
</div>
<div class="row">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Phone </label>
</div>
<div class="col-12 col-md-9">
<input type="number" id="file-input" name="phone" class="form-control" >
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Address </label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="address" class="form-control" >
</div>
</div>
<div class="row">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Licence No </label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="licenceNo" class="form-control" >
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Car No </label>
</div>
<div class="col-12 col-md-9">
<input type="" id="file-input" name="carNo" class="form-control" >
</div>
</div>
<div class="row ">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Years of Experience </label>
</div>
<div class="col-12 col-md-9">
<select name="experience" class="form-select" aria-label="Default select example">
<option value="">-- Select --</option>
<option value="1">1</option>
<option value="3">3</option>
<option value="5">5</option>
</select>
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label"> Set New Image</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="adimg" name="adimg" class="form-control">
</div>
</div>
<div class="card-footer text-light">
<button class="btn btn-primary form-control" type="submit">Register</button>
<p class="text-muted mt-2"> Royal Car Driver salary ranges between ₹ 0.3 Lakhs to ₹ 4.0 Lakhs.</p>
</div>
</form>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<style>
label.error {
color: red;
font-size: 1rem;
display: block;
margin-top: 5px;
}
label.error.fail-alert {
border: 2px solid red;
border-radius: 4px;
line-height: 1;
padding: 2px 0 6px 6px;
background: #ffe6eb;
}
input.valid.success-alert {
border: 2px solid #4CAF50;
color: green;
}
</style>
<script>
$(document).ready(function() {
$("#basic-form").validate({
errorClass: "error fail-alert",
validClass: "valid success-alert",
rules: {
name : {
required: true,
minlength: 3
},
email: {
required: true,
email: true,
},
password: {
required: true,
},
phone : {
required: true,
min:5
},
address: {
required: true,
},
licenceNo: {
required: true,
},
carNo: {
required: true,
},
experience: {
required: true,
},
adimg:{
required: true,
extension: "jpg|jpeg|png|ico|bmp"
}
},
messages : {
name: {
minlength: "Name should be at least 3 characters"
},
email: {
email: "The email should be in the format: abc@domain.tld",
required: "** Fill it right now!",
unique: "** Change it right now!",
},
password: {
required: "Please fill password",
},
}
});
});
</script>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
earnings.blade.php
@include('driver.header')
<head>
<title>EARNINGs</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
</head>
<div class="row my-5">
<div class="col-sm-9 col-md-11 mx-auto ">
<div class="text-center">
<div class="card" >
<div class="card-header bg-secondary d-flex">
<h5 class="card-title w-100 bd-highlight text-light">EARNINGs </h5>
<p class="my-auto flex-shrink-1 bd-highlight">{{ findDri(session()->get('driver_id')) }}</p>
</div>
<div class="card-body ">
<table id="table_id" class="display hover my-2" >
<thead>
<tr>
<th> Sr. No. </th>
<th> Customer </th>
<th> Mobile No </th>
<th> Car No </th>
<th> Pickup Date </th>
<th> Payment Mode </th>
<th> Total </th>
</tr>
</thead>
<tbody style="">
<?php $c=1; $t=0; ?>
@if(isset($onReq))
@foreach($onReq as $item)
<tr>
<td>{{$c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ $item->mobile }}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{$item->pudate}}</td>
<td>{{$item->paymentMode}}</td>
<td>{{$item->total}}</td>
<?php $t=$t+$item->total; ?>
</tr>
@endforeach
@else
<tr>
<td colspan="8"> No Data Found</td>
</tr>
@endif
</tbody>
<tfoot>
<tr>
<td colspan="6"> <h4 class="text-primary"> Grand Total =</h4> </td>
<td ><h4 class="text-primary " id="total_order">${{$t}} </h4> </td>
</tr>
</tfoot>
</table>
<script>
$(document).ready( function () {
var table = $('#table_id').DataTable();
} );
</script>
{{-- add code --}}
{{-- <script type="text/javascript" language="javascript" >
$(document).ready(function(){
var dataTable = $('#table_id').DataTable({
"processing" : true,
"serverSide" : true,
"order" : [],
"ajax" : {
url:"fetch",
type:"POST"
},
drawCallback:function(settings)
{
$('#total_order').html(settings.json.total);
}
});
});
</script> --}}
{{-- ends code --}}
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
footrr.blade.php
<!-- Footer Start -->
<div class="container-fluid bg-secondary py-5 px-sm-3 px-md-5" style="margin-top: 90px;">
<div class="row pt-5">
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Get In Touch</h4>
<p class="mb-2"><i class="fa fa-map-marker-alt text-white mr-3"></i>123 Street, New York, USA</p>
<p class="mb-2"><i class="fa fa-phone-alt text-white mr-3"></i>+012 345 67890</p>
<p><i class="fa fa-envelope text-white mr-3"></i>info@example.com</p>
<h6 class="text-uppercase text-white py-2">Follow Us</h6>
<div class="d-flex justify-content-start">
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-twitter"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-facebook-f"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square mr-2" href="#"><i class="fab fa-linkedin-in"></i></a>
<a class="btn btn-lg btn-dark btn-lg-square" href="#"><i class="fab fa-instagram"></i></a>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Usefull Links</h4>
<div class="d-flex flex-column justify-content-start">
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Private Policy</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Term & Conditions</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>New Member Registration</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Affiliate Programme</a>
<a class="text-body mb-2" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Return & Refund</a>
<a class="text-body" href="#"><i class="fa fa-angle-right text-white mr-2"></i>Help & FQAs</a>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Car Gallery</h4>
<div class="row mx-n1">
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-1.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-2.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-3.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-4.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-5.jpg" alt=""></a>
</div>
<div class="col-4 px-1 mb-2">
<a href=""><img class="w-100" src="img/gallery-6.jpg" alt=""></a>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5">
<h4 class="text-uppercase text-light mb-4">Newsletter</h4>
<p class="mb-4">Volup amet magna clita tempor. Tempor sea eos vero ipsum. Lorem lorem sit sed elitr sed kasd et</p>
<div class="w-100 mb-3">
<div class="input-group">
<input type="text" class="form-control bg-dark border-dark" style="padding: 25px;" placeholder="Your Email">
<div class="input-group-append">
<button class="btn btn-primary text-uppercase px-3">Sign Up</button>
</div>
</div>
</div>
<i>Lorem sit sed elitr sed kasd et</i>
</div>
</div>
</div>
<div class="container-fluid bg-dark py-4 px-sm-3 px-md-5">
<p class="mb-2 text-center text-body">© <a href="#">Your Site Name</a>. All Rights Reserved.</p>
<p class="m-0 text-center text-body">Designed by <a href="https://htmlcodex.com">HTML Codex</a></p>
</div>
<!-- Footer End -->
<!-- Back to Top -->
<a href="#" class="btn btn-lg btn-primary btn-lg-square back-to-top"><i class="fa fa-angle-double-up"></i></a>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>
header.blade.php
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="img/favicon.png" rel="icon">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/css/fontawesome.min.css" integrity="sha384-z4tVnCr80ZcL0iufVdGQSUzNvJsKjEtqYZjiQrrYKlpGow+btDHDfQWkFjoaz/Zr" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Google Web Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Rubik&display=swap" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css" rel="stylesheet">
<!-- Libraries Stylesheet -->
<link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />
<!-- Customized Bootstrap Stylesheet -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Template Stylesheet -->
<link href="css/style.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<style>
input:invalid{
animation: shake .3s infinite;
}
@keyframes shake{
25% { transform: translateX(4px)}
50% { transform: translateX(-4px); border-color: #d10707;}
75% { transform: translateX(4px)}
}
</style>
</head>
<body>
<!-- Topbar Start -->
<div class="container-fluid bg-dark py-3 px-lg-5 d-none d-lg-block">
<div class="row">
<div class="col-md-6 text-center text-lg-left mb-2 mb-lg-0">
<div class="d-inline-flex align-items-center">
<a class="text-body pr-3" href=""><i class="fa fa-phone-alt mr-2"></i>+012 345 6789</a>
<span class="text-body">|</span>
<a class="text-body px-3" href=""><i class="fa fa-envelope mr-2"></i>info@example.com</a>
</div>
</div>
<div class="col-md-6 text-center text-lg-right">
<div class="d-inline-flex align-items-center">
<a class="text-body px-3" href="driver"> Drive with Us</a>
<span class="text-body">|</span>
<a class="text-body px-3" href="">
<i class="fab fa-facebook-f"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-twitter"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-linkedin-in"></i>
</a>
<a class="text-body px-3" href="">
<i class="fab fa-instagram"></i>
</a>
<a class="text-body pl-3" href="">
<i class="fab fa-youtube"></i>
</a>
</div>
</div>
</div>
</div>
<!-- Topbar End -->
<!-- Navbar Start -->
<div class="container-fluid position-relative nav-bar p-0">
<div class="position-relative px-lg-5" style="z-index: 9;">
<nav class="navbar navbar-expand-lg bg-secondary navbar-dark py-3 py-lg-0 pl-3 pl-lg-5">
<a href="/" class="navbar-brand">
<h1 class="text-uppercase text-primary mb-1">Royal Cars</h1>
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-between px-3" id="navbarCollapse">
<div class="navbar-nav ml-auto py-0">
<a class="nav-link active" aria-current="page" href="driver">Home</a>
@if(isDriverLogin())
<a class="nav-link" href="driverAccount">Account</a>
<a class="nav-link" href="driverPassword">Change Password</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
MORE
</a>
<ul class="dropdown-menu bg-secondary" aria-labelledby="navbarDropdown">
<li><a class=" nav-link " href="onRequest">On Requests</a></li>
<li><a class=" nav-link" href="bookings">Bookings</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class=" nav-link" href="earnings">Earnings</a></li>
</ul>
</li>
<a class="nav-link" href="driverLogout">Logout</a>
@else
<a class="nav-link" href="driverRegister">Register Now</a>
<a class="nav-link" href="driverLogin">Login</a>
@endif
</div>
@if(session()->has('status'))
<div class="d-flex">
<span class="badge p-2 fs-6 rounded-pill bg-success">{{session()->get('status')}}</span>
</div>
@endif
@if(session()->has('error'))
<div class="d-flex">
<span class="badge p-2 fs-6 rounded-pill bg-danger">{{session()->get('error')}}</span>
</div>
@endif
</div>
</nav>
</div>
</div>
<!-- Navbar End -->
{{-- end --}}
login.blade.php
@include('driver.header')
<head>
<title>Driver Login </title>
</head>
{{-- carousel --}}
<div class="row my-5">
<div class=" col-md-12 ">
<div class="row container mx-auto">
<div class="col-md-6 mx-auto">
<div class="mx-5 my-4">
<h1 class="text-warning ">Get Started</h1>
<h6 class="text-muted mt-4"> Make the most of your time on the road <br> on the platform with the largest
network of <strong> active riders.</strong> </h6>
</div>
</div>
<div class="col-md-6 my-5 mx-auto">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Login </strong>
</div>
<div class="card-body">
<form action="/driver_login" id="basic-form" method="post" class="form-horizontal">
@csrf
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Email</label>
</div>
<div class="col-12 col-md-9">
<input type="email" id="file-input" name="email" class="form-control">
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" id="file-input" name="password" class="form-control">
</div>
</div>
<div class="card-footer text-light">
<button class="btn btn-dark form-control" type="submit">Login </button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
mailchkg.blade.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="telephone=no" name="format-detection">
<title></title>
<!--[if (mso 16)]>
<style type="text/css">
a {text-decoration: none;}
</style>
<![endif]-->
<!--[if gte mso 9]><style>sup { font-size: 100% !important; }</style><![endif]-->
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG></o:AllowPNG>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<!--[if !mso]><!-- -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
<!--<![endif]-->
</head>
<body>
<div class="es-wrapper-color">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" color="#FFE7F3"></v:fill>
</v:background>
<![endif]-->
<table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-email-paddings" valign="top">
<table class="esd-header-popover es-header" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="esd-stripe" align="center">
<table class="es-header-body" style="border-left:4px solid #ffffff;border-right:4px solid #ffffff;border-top:4px solid #ffffff;border-bottom:4px solid #ffffff;" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center">
<tbody>
<tr>
<td class="esd-structure es-p20" esd-custom-block-id="740648" align="left">
<!--[if mso]><table width="552" cellpadding="0" cellspacing="0"><tr><td width="150" valign="top"><![endif]-->
<table class="es-left" cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<td class="es-m-p0r esd-container-frame es-m-p20b" width="150" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="left">
<p><br><no.reply@royalcars.com></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td><td width="20"></td><td width="382" valign="top"><![endif]-->
<table class="es-right" cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr>
<td class="esd-container-frame" width="382" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="left">
<p style="font-size: 48px; font-family: 'playfair display', georgia, 'times new roman', serif;"><strong><em> ROYAL CARS</em></strong><br></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="esd-stripe" align="center">
<table class="es-content-body" style="border-left:4px solid #ffffff;border-right:4px solid #ffffff;" width="600" cellspacing="0" cellpadding="0" bgcolor="#D8599E" align="center">
<tbody>
<tr>
<td class="esd-structure" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="592" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-image" style="font-size: 0px;" align="center"><a target="_blank" href="https://viewstripo.email"><img class="adapt-img" src="https://tlr.stripocdn.email/content/guids/CABINET_17414fab6e31e9aa151544b147dab92e/images/30829710_7742029.png" alt="Hocus pocus" style="display: block;" title="Hocus pocus" width="592"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="esd-structure es-p40b es-p20r es-p20l" style="background-color: #d8599e;" bgcolor="#D8599E" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="552" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="center">
<p style="font-size: 22px; font-family: arial, 'helvetica neue', helvetica, sans-serif;"><strong>{{$AdminReply['message']}}</strong></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="esd-structure" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="592" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-image" style="font-size: 0px;" align="center"><a target="_blank" href="https://viewstripo.email"><img class="adapt-img" src="https://tlr.stripocdn.email/content/guids/CABINET_17414fab6e31e9aa151544b147dab92e/images/7742035_kVr.png" alt="Happy Halloween" style="display: block;" title="Happy Halloween" width="592"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
onBooking.blade.php
@include('driver.header')
<head>
<title>ALL BOOKINGs</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
</head>
<div class="row my-5">
<div class="col-sm-9 col-md-11 mx-auto ">
<div class="text-center">
<div class="card" >
<div class="card-header bg-secondary d-flex">
<h5 class="card-title w-100 bd-highlight text-light">BOOKINGs </h5>
<p class="my-auto flex-shrink-1 bd-highlight">{{ findDri(session()->get('driver_id')) }}</p>
</div>
<div class="card-body ">
<table id="table_id" class="display hover my-2" >
<thead>
<tr>
<th> Customer </th>
<th> Mobile No </th>
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Adult Person </th>
<th> Child Person </th>
<th> Message </th>
<th> Payment Mode </th>
<th> Booking Actions </th>
<th> Trip Time</th>
</tr>
</thead>
<tbody style="">
<?php $c=1; ?>
@foreach($onReq as $item)
<tr @if($item->status=='1') style="background: #ebb96e5b" @endif>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ $item->mobile }}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{findLoc($item->drloc)}} </td>
<td>{{$item->pudate}}</td>
<td>{{$item->putime}}</td>
<td>{{$item->personAd}}</td>
<td>{{$item->personCh}}</td>
<td>
<span class="d-inline-block text-truncate" style="max-width: 100px;">
{{$item->message}}
</span></td>
<td>{{$item->paymentMode}}</td>
<td>
@if($item->status=='2')
<a href="/bookingConfirm/{{$item->id}}/true" class='text-success fs-5 mx-2' data-toggle="tooltip" data-placement="top" title="Confirm Booking then click it"><i class="fa fa-check-square" aria-hidden="true"></i></a>
<a href="/bookingConfirm/{{$item->id}}/false" class='text-danger fs-5' data-toggle="tooltip" data-placement="top" title="Busy then click it, Automatically cancle other requests on that date" ><i class="fa fa-times-square" aria-hidden="true"></i></a>
@else
<a href="/bookingConfirm/{{$item->id}}/null" class='text-success fs-5 mx-2' data-toggle="tooltip" data-placement="top" @if($item->status) title="Recent: Available. Want to undo" @else title="Recent: Unavailable. Want to undo" @endif> <i class="fa fa-undo" aria-hidden="true"></i> </a>
@endif
</td>
<td>
<a href="/viewTrip/{{$item->id}}" class='text-primary fs-5 mx-2' data-toggle="tooltip" data-placement="top" title="Quality Ride"><i class="fa fa-external-link" aria-hidden="true"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
<script>
$(document).ready( function () {
$('#table_id').DataTable();
} );
</script>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
onRequest.blade.php
@include('driver.header')
<head>
<title>ALL ON REQUESTs</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
</head>
<div class="row my-5">
<div class="col-sm-9 col-md-10 mx-auto ">
<div class="text-center">
<div class="card" >
<div class="card-header bg-secondary d-flex">
<h5 class="card-title w-100 bd-highlight text-light">On Requests </h5>
<p class="my-auto flex-shrink-1 bd-highlight">{{ findDri(session()->get('driver_id')) }}</p>
</div>
<div class="card-body ">
<table id="table_id" class="display hover my-2" >
<thead>
<tr>
<th> Sr. No. </th>
<th> Customer </th>
{{-- <th> Driver </th> --}}
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Mail </th>
<th> Available </th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@foreach($onReq as $item)
<tr @if($item->available) style="background: #ebb96e5b" @endif>
<td>{{$c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
{{-- <td>{{ findDri($item->driver_id)}}</td> --}}
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->droploc) }}</td>
<td>{{$item->pudate}}</td>
<td>{{$item->putime}}</td>
<td>
@if($item->mail)
<i class="fa fa-envelope-open text-success fs-5" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="Mail sent "></i>
@else
<form action="dvr_rply" method="POST">
@csrf
<input type="hidden" name="a_id" id="" value="{{$item->id}}">
<button type="submit" class="text-info btn" data-toggle="tooltip" data-placement="top" title="Want to send confirmation mail"><i class="fa fa-reply" aria-hidden="true" ></i></button>
</form>
@endif
</td>
<td>
@if($item->available==null)
<a href="dvr_availunavail/{{$item->id}}/true" class='text-success fs-5 mx-4' data-toggle="tooltip" data-placement="top" title="Available then click it"><i class="fa fa-check-square" aria-hidden="true"></i></a>
<a href="dvr_availunavail/{{$item->id}}/false" class='text-danger fs-5' data-toggle="tooltip" data-placement="top" title="Busy then click it" ><i class="fa fa-times-square" aria-hidden="true"></i></a>
@else
<a href="dvr_availunavail/{{$item->id}}/null" class='text-success fs-5 mx-4' data-toggle="tooltip" data-placement="top" @if($item->available) title="Recent: Available. Want to undo" @else title="Recent: Unavailable. Want to undo" @endif> <i class="fa fa-undo" aria-hidden="true"></i> </a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<script>
$(document).ready( function () {
$('#table_id').DataTable();
} );
</script>
</div>
<div class="my-2 justify-content-end d-flex mx-5">
<a href="#" class="btn"> Check Bookings <i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
pswdchng.blade.php
@include('driver.header')
<head>
<title>Driver Change Password </title>
</head>
{{-- carousel --}}
<div class="row my-5">
<div class=" col-md-10 mx-auto">
<div class="row">
<div class="col-md-6 mx-auto">
<div class="mx-5 my-4">
<h1 class="text-success ">My Profile</h1>
<h6 class="text-muted mt-4"><strong>Keep it Up!</strong> <br>Remember: The longer and more random your password, the better! </h6>
</div>
</div>
<div class="col-md-6 my-5 mx-auto">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Change Password </strong>
</div>
<div class="card-body">
<form action="/driver_Pass_Chng" id="basic-form" method="post" class="form-horizontal">
@csrf
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Old Password</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="op" class="form-control">
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> New Password</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="np" class="form-control">
</div>
</div>
<div class="row my-2">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Confirm Password</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="cp" class="form-control">
</div>
</div>
<div class="card-footer text-light">
<button class="btn btn-outline-success form-control" type="submit"> Update Password </button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
search_bkkngs.blade.php
@include('driver.header')
<head>
<title>Driver_Portal</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script>
</head>
@include('driver.searchCom')
<div class="row my-3">
<div class="col-sm-9 col-md-11 mx-auto ">
<div class="text-center">
<div class="card" >
<div class="card-header bg-secondary d-flex">
<h5 class="card-title w-100 bd-highlight text-light">Search Results on Booking</h5>
<p class="my-auto flex-shrink-1 bd-highlight">{{ findDri(session()->get('driver_id')) }}</p>
</div>
<div class="card-body ">
<table id="table_id" class="display hover my-2" >
<thead>
<tr>
<th> Sr. No. </th>
<th> Customer </th>
<th> Mobile No </th>
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Adult Person </th>
<th> Child Person </th>
<th> Message </th>
<th> Payment Mode </th>
<th> Booking Actions </th>
<th> Trip Time</th>
</tr>
</thead>
<tbody style="">
<?php $c=1; ?>
@if(isset($data))
@foreach($data as $item)
<tr @if($item->status=='1') style="background: #ebb96e5b" @endif>
<td>{{$c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ $item->mobile }}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{findLoc($item->drloc)}} </td>
<td>{{$item->pudate}}</td>
<td>{{$item->putime}}</td>
<td>{{$item->personAd}}</td>
<td>{{$item->personCh}}</td>
<td>
<span class="d-inline-block text-truncate" style="max-width: 100px;">
{{$item->message}}
</span></td>
<td>{{$item->paymentMode}}</td>
<td>
@if($item->status=='2')
<a href="bookingConfirm/{{$item->id}}/true" class='text-success fs-5 mx-4' data-toggle="tooltip" data-placement="top" title="Confirm Booking then click it"><i class="fa fa-check-square" aria-hidden="true"></i></a>
<a href="bookingConfirm/{{$item->id}}/false" class='text-danger fs-5' data-toggle="tooltip" data-placement="top" title="Busy then click it, Automatically cancle other requests on that date" ><i class="fa fa-times-square" aria-hidden="true"></i></a>
@else
<a href="bookingConfirm/{{$item->id}}/null" class='text-success fs-5 mx-4' data-toggle="tooltip" data-placement="top" @if($item->status) title="Recent: Available. Want to undo" @else title="Recent: Unavailable. Want to undo" @endif> <i class="fa fa-undo" aria-hidden="true"></i> </a>
@endif
</td>
<td>
<a href="/viewTrip/{{$item->id}}" class='text-primary fs-5 mx-2' data-toggle="tooltip" data-placement="top" title="Quality Ride"><i class="fa fa-external-link" aria-hidden="true"></i></a>
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="13"> No Data Found</td>
</tr>
@endif
</tbody>
</table>
<script>
$(document).ready( function () {
$('#table_id').DataTable();
} );
</script>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
searchCom.blade.php
<!-- Search Start -->
<div class="container-fluid bg-white pt-3 px-lg-5">
<form action="SrchCustmrasDriver" method="post">
@csrf
<div class="row mx-n2">
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select name="puloc" id="puloch" class="custom-select px-4 mb-3" style="height: 50px;">
<option value="" selected>Pickup Location</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
@if (isset($req)) @if ($req->puloc == $loc->id) selected @endif
@endif>{{ $loc->area }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select name="drloc" id="drloch" class="custom-select px-4 mb-3" style="height: 50px;">
<option value="" selected>Drop Location</option>
@foreach ($locations as $loc)
<option value="{{ $loc->id }}"
@if (isset($req)) @if ($req->drloc == $loc->id) selected @endif
@endif>{{ $loc->area }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6" id="pudateh1">
<input type="date" id="pudateh22" name="pudate"
class="p-4 form-control "@if (isset($req)) value="{{ $req->pudate }}" @endif />
</div>
<script language="javascript">
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0');
var yyyy = today.getFullYear();
today = yyyy + '-' + mm + '-' + dd;
$('#pudateh22').attr('min',today);
</script>
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select class="custom-select px-4 mb-3" style="height: 50px;" name="car_id" id="car_idh">
<option value="" selected>Select A Car</option>
@foreach ($cars as $car)
<option value="{{ $car->id }}"
@if (isset($req)) @if ($req->car_id == $car->id) selected @endif
@endif> {{ $car->name }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2">
<select class="custom-select px-4 mb-3" style="height: 50px;" name="customerSel" id="customerSelh">
<option value="" selected>Customer</option>
@foreach ($customers as $customer)
<option value="{{ $customer->id }}"
@if (isset($req)) @if ($req->customerSel == $customer->id) selected @endif
@endif> {{ $customer->name }}</option>
@endforeach
</select>
</div>
<div class="col-xl-2 col-lg-4 col-md-6 px-2 mx-auto" onclick="checking2()">
<button class="btn btn-primary btn-block mb-3" type="submit" style="height: 50px;">Search Now</button>
</div>
</div>
</form>
<script>
function checking2() {
puloc = document.getElementById('puloch').value;
drloc = document.getElementById('drloch').value;
pudate = document.getElementById('pudateh').value;
putime = document.getElementById('putimeh').value;
carSel = document.getElementById('car_idh').value;
var varDate = new Date(pudate); //dd-mm-YYYY
var today = new Date();
// console.log(puloc ,drloc ,pudate,putime, driverSel, carSel);
// if(puloc == drloc)
// {
// alert('Pickup location and Drop location cannot be same');
// event.preventDefault();
// return false;
// }
if (pudate == '') {
alert('Date cannot be blank');
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
<!-- Search End -->
viewTrip.blade.php
<base href="/public">
@include('driver.header')
<head>
<title>View Trip</title>
</head>
{{-- carousel --}}
<div class="row my-5 ">
<div class="col-12">
<div class="d-flex justify-content-around">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Customer Trip View </strong>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Customer Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCust($item->customer_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Mobile No</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->mobile }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Car Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCar($item->car_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Pickup Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->puloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Drop Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->drloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp Date</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->pudate }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp Time</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->putime }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Adult Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->personAd }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Child Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->personCh }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Message</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name" value="{{ $item->message }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Price </label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="$ {{ $item->total }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Payment Mode</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->paymentMode }}" readonly>
</div>
</div>
</div>
</div>
<div class="card border border-secondary w-25 h-25 mt-4">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Action </strong>
</div>
<div class="card-body">
<div class="form-group">
<label for="file-input" class=" form-control-label"> Current Status</label>
<div class="form-control mx-2">
@if ($item->bookStatus == '0' && $item->status == '1')
<i class="fa fa-car" aria-hidden="true"></i> Trip Started
@elseif($item->bookStatus == '1')
<i class="fa fa-street-view" aria-hidden="true"></i> Arrived At Location
@elseif($item->bookStatus == '2')
<i class="fa fa-id-badge" aria-hidden="true"></i> Pickup Customer Done
@elseif($item->bookStatus == '3')
<i class="fa fa-blind" aria-hidden="true"></i> Drop Customer
@elseif($item->bookStatus == '4')
<i class="fa fa-check" aria-hidden="true"></i> Payment Success
@elseif($item->bookStatus == '5')
<i class="fa fa-bell" aria-hidden="true"></i> Payment Due
@elseif($item->bookStatus == '6')
<i class="fa fa-times " aria-hidden="true"></i> Problem Case Arries
@endif
</div>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Change Status</label>
<a href="/regTrips/{{ $item->id }}/start" class='form-control text-secondary fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Start This Ride"><i class="fa fa-car"
aria-hidden="true"></i> Start This Ride</a>
<a href="/regTrips/{{ $item->id }}/arrive" class='form-control text-success fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Arrived At Location"><i
class="fa fa-street-view" aria-hidden="true"></i>
Arrived At Location</a>
<a href="/regTrips/{{ $item->id }}/pickup" class='form-control text-info fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Pickup Customer Done"><i
class="fa fa-id-badge" aria-hidden="true"></i> Pickup
Customer Done</a>
<a href="/regTrips/{{ $item->id }}/drop" class='form-control text-primary fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Drop Customer"><i class="fa fa-blind"
aria-hidden="true"></i> Drop
Customer</a>
<a href="/regTrips/{{ $item->id }}/paySuccess"
class='form-control text-Success fs-5 mx-2' data-toggle="tooltip" data-placement="top"
title="Payment Success"><i class="fa fa-check" aria-hidden="true"></i> Payment
Success</a>
<a href="/regTrips/{{ $item->id }}/payDue" class=' form-control text-warning fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Payment Due"><i class="fa fa-bell"
aria-hidden="true"></i> Payment
Due</a>
<a href="/regTrips/{{ $item->id }}/sos" class='text-danger form-control fs-5 mx-2'
data-toggle="tooltip" data-placement="top" title="Exception Case"><i class="fa fa-times"
aria-hidden="true"></i> Any Problem</a>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Customer Feedback</label>
<a href="/feedbackMailSend/{{$item->id}}" class='form-control fs-5 mx-2'> <i class="fa fa-envelope text-info"
aria-hidden="true"></i> Feedback Form <i class="fa fa-paper-plane text-success"
aria-hidden="true"></i> </a>
</div>
</div>
</div>
</div>
</div>
</div>
@include('driver.footrr')
Customer blade view files
chkBooking.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Bookings</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if (session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('status') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if (session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('error') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1 mr-5">Booking Table</h2>
<div class="justify-content-end d-flex my-3">
<form action="{{ route('BookingSrch_cs') }}" method="GET">
<div class="form-check-inline">
<input type="text" placeholder="Search Now" class="form-control input-sm" id="srch" name="srch" @if (isset($srchbck)) value={{ $srchbck }} @endif>
<button type="submit" class="btn" title="search" onclick="srchval()"><i
class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script>
function srchval() {
data = document.getElementById('srch').value;
if (!data) {
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="justify-content-end d-flex">
<form action="bkk_date_srch_cs" method="POST">
@csrf
<div class="form-check-inline">
<label for="date" class="col-form-label col-sm-0">From</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="fromdate" name="start_date" @if(isset($req)) value={{$req->start_date}} @endif >
</div>
<label for="date" class="col-form-label col-sm-0">To</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="todate" name="end_date" @if(isset($req)) value={{$req->end_date}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="dateval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function dateval(){
fromdate=document.getElementById('fromdate').value;
todate=document.getElementById('todate').value;
// console.log(fromdate);
// console.log(todate);
if (Date.parse(fromdate) > Date.parse(todate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
fromdate=Date;
event.preventDefault();
return false;
}
if(!fromdate || !todate){
alert("Date Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
</div>
{{-- Search field --}}
{{-- srch fld ends --}}
<div class="table-responsive my-5">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th> Sr. No. </th>
<th> Car Name </th>
<th> Driver Name </th>
<th> Customer Name </th>
<th> Mobile </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Adults </th>
<th> Childs </th>
<th> Message </th>
<th> Payment Mode </th>
<th> Total </th>
<th> Check Status </th>
</tr>
</thead>
<tbody>
<?php $c = 1; ?>{{-- ['adeu' => $adfn, 'data'=>$data, 'cust'=>$cust, 'car'=>$car, 'driver'=>$driver --}}
@if(count($data)>0)
@foreach ($data as $item)
<tr @if ($item->available) style="background: #ebb96e5b" @endif>
<td>{{ $c++ }}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findDri($item->driver_id)}}</td>
<td>{{ findCust($item->customer_id)}}</td>
<td>{{ $item->mobile }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->drloc) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->putime }}</td>
<td>{{ $item->personAd }}</td>
<td>{{ $item->personCh }}</td>
<td>{{ $item->message }}</td>
<td>{{ $item->paymentMode }}</td>
<td>{{ $item->total }}</td>
<td>
@if ($item->status=='1')
<a href="/myTrip2/{{$item->id}}" class='text-success' data-toggle="tooltip" data-placement="top" title="Show Ride Details"> Booking Confirm <i class="fa fa-arrow-circle-right"></i></a>
@elseif($item->status=='0')
<h5 class="text-dark">Booking Cancle</h5>
@else
<h5 class="text-info">No Response</h5>
@endif
</td>
</tr>
@endforeach
@else
<td colspan="15" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
@if(!isset($srchbck) )
@if(!isset($req))
<div class="d-flex justify-content-end my-4">
{{$data->links() }}
{{-- d-flex justify-content-end my-4 --}}
</div>
@endif
@endif
@if(isset($srchbck) || isset($req))
<div class="text-right mx-3 my-5">
<a href="/chkBooking"> <i class="fa fa-reply"></i> Show All</a>
</div>
@endif
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}"></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}"></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}"></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}"></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}"></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}"></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}"></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}"></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}"></script>
</body>
</html>
<!-- end document-->
chkRequest.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Car Availability</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if (session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('status') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if (session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('error') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1 mr-2">Availability Table</h2>
<div class="justify-content-end d-flex my-3">
<form action="{{ route('RequestSrch_cs') }}" method="GET">
<div class="form-check-inline">
<input type="text" placeholder="Search Now" class="form-control input-sm" id="srch" name="srch" @if (isset($srchbck)) value={{ $srchbck }} @endif>
<button type="submit" class="btn" title="search" onclick="srchval()"><i
class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script>
function srchval() {
data = document.getElementById('srch').value;
if (!data) {
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="justify-content-end d-flex">
<form action="avai_date_srch_cs" method="POST">
@csrf
<div class="form-check-inline">
<label for="date" class="col-form-label col-sm-0">From</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="fromdate" name="start_date" @if(isset($req)) value={{$req->start_date}} @endif >
</div>
<label for="date" class="col-form-label col-sm-0">To</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="todate" name="end_date" @if(isset($req)) value={{$req->end_date}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="dateval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function dateval(){
fromdate=document.getElementById('fromdate').value;
todate=document.getElementById('todate').value;
// console.log(fromdate);
// console.log(todate);
if (Date.parse(fromdate) > Date.parse(todate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
fromdate=Date;
event.preventDefault();
return false;
}
if(!fromdate || !todate){
alert("Date Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
</div>
{{-- Search field --}}
{{-- srch fld ends --}}
<div class="table-responsive my-5">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th> Sr. No. </th>
<th> Customer </th>
<th> Driver </th>
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Mail </th>
<th> Available </th>
</tr>
</thead>
<tbody>
<?php $c = 1; ?>{{-- ['adeu' => $adfn, 'data'=>$data, 'cust'=>$cust, 'car'=>$car, 'driver'=>$driver --}}
@if(count($data)>0)
@foreach ($data as $item)
<tr @if ($item->available) style="background: #ebb96e5b" @endif>
<td>{{ $c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ findDri($item->driver_id)}}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->droploc) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->putime }}</td>
<td>
@if ($item->mail)
<h5 class="text-success">Mail sent</h5>
@else
<h5 class="text-info">No Mails</h5>
@endif
</td>
<td>
@if ($item->available == null)
<h5 class="text-info">No response</h5>
@else
@if($item->available == 1)
<h5 class="text-success">Available</h5>
@else
<h5 class="text-danger">Unavailable</h5>
@endif
@endif
</td>
</tr>
@endforeach
@else
<td colspan="10" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
@if(!isset($srchbck) )
@if(!isset($req))
<div class="d-flex justify-content-end my-4">
{{$data->links() }}
{{-- d-flex justify-content-end my-4 --}}
</div>
@endif
@endif
@if(isset($srchbck)|| isset($req))
<div class="text-right mx-3 my-5">
<a href="/chkRequests"> <i class="fa fa-reply"></i> Show All</a>
</div>
@endif
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}"></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}"></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}"></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}"></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}"></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}"></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}"></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}"></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}"></script>
</body>
</html>
<!-- end document-->
fdFormSubmit.blade.php
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="img/favicon.png" rel="icon">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/css/fontawesome.min.css" integrity="sha384-z4tVnCr80ZcL0iufVdGQSUzNvJsKjEtqYZjiQrrYKlpGow+btDHDfQWkFjoaz/Zr" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Google Web Fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Rubik&display=swap" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.0/css/all.min.css" rel="stylesheet">
<!-- Libraries Stylesheet -->
<link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" />
<!-- Customized Bootstrap Stylesheet -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Template Stylesheet -->
<link href="css/style.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<title>Feedback Form </title>
</head>
{{-- carousel --}}
<body>
<div class="bg-dark text-primary">
<div class="d-flex justify-content-around">
<h1 class="text-uppercase text-warning mb-1 mx-5"> <i> Royal Cars </i></h1>
<h4 class="text-uppercase text-light my-auto">Feedback Form</h4>
</div>
</div>
<div class="row my-5">
<div class=" col-md-5 mx-auto ">
<div class="card border border-secondary">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Feedback Form </strong>
</div>
<div class="card-body">
<form action="/submitTesti" method="post">
@csrf
<input type="hidden" name="bkk_id" value="{{ $item->id }}">
<textarea class="border border-success " name="message" cols="80" rows="5"
placeholder=" Hi, Share your thoughts, You may have a beautiful ride."></textarea>
<br>
<div class="form-group bg-dark text-center p-2">
<input type="radio" value="1" class="mx-2" name="rating" required="required"> <i
class="fa fa-star text-warning"></i>
<input type="radio" value="2" class="mx-2" name="rating" required="required"> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i>
<input type="radio" value="3" class="mx-2" name="rating" required="required"> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i> <i
class="fa fa-star text-warning"></i>
<input type="radio" value="4" class="mx-2" name="rating" required="required"> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i>
<input type="radio" value="5" class="mx-2" name="rating" required="required"> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i> <i
class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i> <i
class="fa fa-star text-warning"></i>
</div>
<button class="w-100 my-2 btn btn-outline-success" type="submit" name='btnSub'>
<i class="fa fa-arrow-right "></i> Submit
</button>
</form>
<p>Have a beautiful Ride ahead !! Best Wishes from "Royal Cars.</p>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>
fdmail.blade.php
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="telephone=no" name="format-detection">
<title>FeedBack Mail</title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="es-wrapper-color">
<table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
Hello!
</td>
</tr>
<tr>
<td>
Please click the button below for feedback your last ride.
</td>
</tr>
<tr>
<td><a style='color:green;' href='http://cardekho.loc/addTesti/{{$data}}'> Feedback Form </a> </td>
</tr>
<tr>
<td>
If you did not share this feedback, no further action is required.
</td>
</tr>
<tr>
<td>
Regards,
</td>
</tr>
<tr>
<td>Royal Cars</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
myTrip.blade.php
<base href="/public">
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<head>
<title>My Trip Details</title>
</head>
{{-- carousel --}}
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row ">
<div class="col-12">
<div class="d-flex justify-content-around">
<div class="card border border-warning">
<div class="card-header bg-secondary text-light text-center">
<strong class="card-title"> Customer Trip View </strong>
<span class="ml-5 badge badge-light"> {{feedbackDone($item->id)}}</span>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Customer Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCust($item->customer_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Mobile No</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->mobile }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Car Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCar($item->car_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Pickup Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->puloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Drop Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->drloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp
Date</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->pudate }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp
Time</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->putime }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Adult
Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->personAd }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Child
Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->personCh }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Message</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->message }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Price </label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="$ {{ $item->total }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Payment
Mode</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->paymentMode }}" readonly>
</div>
</div>
</div>
</div>
<div class="card border border-info w-25 h-25 mt-4">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Details </strong>
</div>
<div class="card-body">
<div class="form-group">
<label for="file-input" class=" form-control-label"> Current
Status</label>
<div class="form-control">
@if ($item->bookStatus == '0' && $item->status == '1')
<i class="fa fa-car text-secondary" aria-hidden="true"></i> Trip
Started
@elseif($item->bookStatus == '1')
<i class="fa fa-street-view text-info" aria-hidden="true"></i>
Arrived At Location
@elseif($item->bookStatus == '2')
<i class="fa fa-id-badge text-primary" aria-hidden="true"></i>
Pickup Customer
@elseif($item->bookStatus == '3')
<i class="fa fa-blind text-warning" aria-hidden="true"></i> Drop Customer
@elseif($item->bookStatus == '4')
<i class="fa fa-check text-success" aria-hidden="true"></i>
Payment Success
@elseif($item->bookStatus == '5')
<i class="fa fa-bell text-warning" aria-hidden="true"></i> Payment Due
@elseif($item->bookStatus == '6')
<i class="fa fa-times text-danger" aria-hidden="true"></i> SOS
@endif
</div>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Driver Ratings:</label>
<?php for($i = 0; $i < ratingAvg($driverData->id); $i++){ ?>
<i class="fa fa-star text-warning "></i>
<?php } ?><br>
<label for="file-input" class=" form-control-label"> Driver Name</label>
<input class="form-control" type="text" name="name"
value="{{ findDri($item->driver_id) }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Phone No:</label>
<input class="form-control" type="text" name="phone"
value="{{ $driverData->phone }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Car No:</label>
<input class="form-control" type="text" name="phone"
value="{{ $driverData->carNo }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label">Experience:</label>
<input class="form-control" type="text" name="phone"
value="{{ $driverData->experience }} yrs" readonly>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}" readonly></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}" readonly></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}" readonly></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}" readonly></script>
</body>
</html>
<!-- end document-->
Admin blade view files
inside adcommon folder files
ftrjq.blade.php
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js')}} "></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}} "></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{ asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js')}}"></script>
{{-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> --}}
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
</body>
</html>
<!-- end document-->
header.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<link href="img/favicon.png" rel="icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
sidemenu.blade.php
<body class="animsition">
<div class="page-wrapper">
<!-- HEADER MOBILE-->
<header class="header-mobile d-block d-lg-none">
<div class="header-mobile__bar">
<div class="container-fluid">
<div class="header-mobile-inner">
<a class="logo" href="index.html">
<img src="{{ asset('admin/images/icon/logo.png') }}" alt="CoolAdmin" />
</a>
<button class="hamburger hamburger--slider" type="button">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
</div>
</div>
<nav class="navbar-mobile">
<div class="container-fluid">
<ul class="list-unstyled navbar__list">
<li class="active has-sub">
<a class="js-arrow" href="adindex">
<i class="fas fa-tachometer-alt"></i>Dashboard</a>
</li>
@if(auth()->user())
<?php $rolelist= explode(', ', auth()->user()->role_id); ?>
@foreach($rolelist as $role)
@if($role == 1)
<li class="has-sub">
<a class="js-arrow" href="#">
<i class="fas fa-copy"></i>Enquiry</a>
<ul class="navbar-mobile-sub__list list-unstyled js-sub-list">
<li>
<a href="/admail">Mails</a>
</li>
</ul>
</li>
<li class="has-sub">
<a class="js-arrow" href="chnger">
<i class="fas fa-th-list"></i> Banner</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="user_roles">
<i class="fas fa-user"></i> Users</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="user_roles">
<i class="fas fa-user"></i> Users</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="allDr_Cu">
<i class="fas fa-user"></i> All</a>
</li>
@endif
@if($role== 2)
<li class="has-sub">
<a class="js-arrow" href="#">
<i class="fas fa-user"></i> Driver</a>
</li>
@endif
@if($role== 3)
<li class="has-sub">
<a class="js-arrow" href="#">
<i class="fas fa-user"></i> Customer</a>
</li>
@endif
@endforeach
@endif
</ul>
</div>
</nav>
</header>
<!-- END HEADER MOBILE-->
<!-- MENU SIDEBAR-->
<aside class="menu-sidebar d-none d-lg-block">
<div class="logo">
<a href="#">
<img src="{{ asset('admin/images/icon/logo.png') }}" alt="Cool Admin" />
</a>
</div>
<div class="menu-sidebar__content js-scrollbar1">
<nav class="navbar-sidebar">
<ul class="list-unstyled navbar__list">
<li class="active has-sub">
<a class="js-arrow" href="adindex">
<i class="fas fa-tachometer-alt"></i> Dashboard</a>
</li>
@if(userRole()==1)
<li class="has-sub">
<a class="js-arrow" href="user_roles">
<i class="fas fa-user"></i> Customers</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="#">
<i class="fas fa-copy"></i>Enquiry</a>
<ul class="navbar-mobile-sub__list list-unstyled js-sub-list">
<li>
<a class="js-arrow" href="/admail">
<i class="fas fa-envelope"></i> Mails</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/readRequest">
<i class="fas fa-braille"></i> Availability</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/bookingList">
<i class="fa fa-list-alt"></i> Bookings</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/drEarnings">
<i class="fa fa-bar-chart-o"></i> Sales Report</a>
</li>
</ul>
</li>
<li class="has-sub">
<a class="js-arrow" href="/chnger">
<i class="fas fa-th-list"></i> Banner</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/driverList">
<i class="fas fa-id-card"></i> Drivers</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/allDr_Cu">
<i class="fas fa-user"></i> All Users</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/showTesti">
<i class="fas fa-user"></i> Testimonials</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/carList">
<i class="fas fa-car"></i> Cars</a>
</li>
@elseif(userRole()==2)
<li class="has-sub">
<a class="js-arrow" href="#">
<i class="fas fa-user"></i> Driver</a>
</li>
@elseif(userRole()==3)
<li class="has-sub">
<a class="js-arrow" href="/chkRequests">
<i class="fas fa-user"></i> Car Availability</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/chkBooking">
<i class="fas fa-user"></i> Car Bookings</a>
</li>
<li class="has-sub">
<a class="js-arrow" href="/">
<i class="fas fa-user"></i> Royal Cars</a>
</li>
@endif
</ul>
</nav>
</div>
</aside>
<!-- END MENU SIDEBAR-->
<!-- PAGE CONTAINER-->
<div class="page-container">
<!-- HEADER DESKTOP-->
<header class="header-desktop ">
<div class="section__content section__content--p30 ">
<div class="container-fluid ">
<div class="header-wrap justify-content-end">
<div class="header-button justify-content-end">
<div class="account-wrap ">
<div class="account-item clearfix js-item-menu ">
<div class="image">
<img src="{{$adeu->image}}" alt="{{ session()->get('adeu')['name']}}" />
</div>
<div class="content">
<a class="js-acc-btn" href="#">{{ session()->get('adeu')['name']}}</a>
</div>
<div class="account-dropdown js-dropdown">
<div class="info clearfix">
<div class="image">
<a href="#">
<img src="{{$adeu->image}}" alt="{{ session()->get('adeu')['name']}}" />
</a>
</div>
<div class="content">
<h5 class="name">
<a href="#">{{ session()->get('adeu')['name']}}</a>
</h5>
<span class="email">{{ session()->get('adeu')['email']}}</span>
</div>
</div>
<div class="account-dropdown__body">
<div class="account-dropdown__item">
<a href="adacc">
<i class="zmdi zmdi-account"></i>Account</a>
</div>
<div class="account-dropdown__item">
<a href="adchpas">
<i class="zmdi zmdi-account"></i>Reset Password</a>
</div>
</div>
<div class="account-dropdown__footer">
<a href="/adlogout">
<i class="zmdi zmdi-power"></i>Logout</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</header>
<!-- HEADER DESKTOP-->
adaccount.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Admin Account</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('message'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('message')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Admin Account Details </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
{{-- body --}}
<div class="d-flex ">
<div class="w-25">
<div class="p-2 my-5">
<img src="{{$adeu->image}}" width="200px" alt="">
<label for="">Recent Image</label>
</div>
</div>
<div class="w-50">
<div class="card">
<div class="card-header">
<h2 style="text-align:right;float:right;" class="btn btn-info"> {{$data2[0]->title}} </h2>
</div>
<div class="card-body">
<form action="/adfrupdateac" method="post" id="basic-form" enctype="multipart/form-data">
@csrf
<input type="hidden" name="adid" value="{{$adeu->id}}">
<input type="hidden" name="old_img" value="{{$adeu->image}}">
<div class="form-group">
<label>Username</label>
<input class="au-input au-input--full" type="text" name="name" id="name" placeholder="Username" value="{{$adeu->name}}">
</div>
<div class="form-group">
<label>Email Address</label>
<input class="au-input au-input--full" type="email" name="email" id="email" placeholder="Email" value="{{$adeu->email}}">
</div>
<div class="form-group">
<label>Upload Image</label>
<input type="file" name="adimg" id="adimg" class="au-input">
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Update</button>
</form>
</div>
</div>
</div>
</div>
<style>
label.error {
color: red;
font-size: 1rem;
display: block;
margin-top: 5px;
}
label.error.fail-alert {
border: 2px solid red;
border-radius: 4px;
line-height: 1;
padding: 2px 0 6px 6px;
background: #ffe6eb;
}
input.valid.success-alert {
border: 2px solid #4CAF50;
color: green;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script>
$(document).ready(function() {
$("#basic-form").validate({
errorClass: "error fail-alert",
validClass: "valid success-alert",
rules: {
name : {
required: true,
minlength: 3
},
email: {
required: true,
email: true,
},
password: {
required: true,
},phone:{
required: true,
min:999999999,
max:9999999999
},adimg:{
extension: "jpg|jpeg|png|ico|bmp"
}
},
messages : {
name: {
minlength: "** Name should be at least 3 characters"
},
email: {
email: "** The email should be in the format: abc@domain.tld",
required: "** Fill it right now!",
unique: "** Change it right now!",
},
password: {
required: "** Please fill password",
},phone:{
required: "** Please fill phone",
min: "** Not lesser than 10 digit number",
max: "** Not greater than 10 digit number",
}
}
});
});
</script>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
add_user_role.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Create User Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Create new User </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header text-light" style="background-color: #4b7880 !important;">
<strong class="card-title">Create new User </strong>
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="card-body">
<form action="/add_ac_user_role" method="post" enctype="multipart/form-data" class="form-horizontal mt-5">
@csrf
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" name="name" class="form-control" >
</div>
</div>
{{-- name, email, roles, image --}}
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Email</label>
</div>
<div class="col-12 col-md-9">
<input type="email" name="email" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Password</label>
</div>
<div class="col-12 col-md-9">
<input type="password" name="password" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> User Role</label>
</div>
<div class="col-12 col-md-9">
<div class="form-check-inline form-check">
@foreach($eduall as $role)
@if(strtoupper($role->title)!='ADMIN')
<label for="inline-checkbox1" class="form-check-label ">
<input type="radio" id="{{$role->id}}" name="roles" value="{{$role->id}}" class="form-check-input mx-3"> {{$role->title}}
</label>
@endif
@endforeach
</div>
{{-- body 'adeu' => $adfn, 'user'=> $usr , 'eduall' => $rolesall, 'data2' =>$data2 --}}
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label"> Set New Image </label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="image" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green " type="submit"> Update </button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
addpage.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Edit Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Create Page Banner & Title </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header">
<strong class="card-title"> Banner Create Page </strong>
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="card-body">
<form action="/addpggac" method="post" enctype="multipart/form-data" class="form-horizontal my-5">
@csrf
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="page" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Title</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="title" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Active</label>
</div>
<div class="col-12 col-md-9">
<input type="radio" id="file-input" name="pgact" class="mx-5" value="1"> <span for="">Active</span>
<input type="radio" id="file-input" name="pgact" value="0" class="mx-5"><span for="" >Inactive</span>
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label">Multiple File input</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="images[]" multiple="" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Create</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
adShowTrip.blade.php
<base href="/public">
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<head>
<title>My Trip Details</title>
</head>
{{-- carousel --}}
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row ">
<div class="col-12">
<div class="d-flex justify-content-around">
<div class="card border border-warning">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Customer Trip View </strong>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Customer
Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCust($item->customer_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Mobile No</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->mobile }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Car Name</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findCar($item->car_id) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Pickup
Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->puloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Drop
Location</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ findLoc($item->drloc) }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp
Date</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->pudate }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> PickUp
Time</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->putime }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Adult
Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->personAd }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label">Child
Persons</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->personCh }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Message</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->message }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Price </label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="$ {{ $item->total }}" readonly>
</div>
</div>
<div class="row my-2">
<div class="col-md-5">
<label for="file-input" class=" form-control-label"> Payment
Mode</label>
</div>
<div class="col-md-7">
<input class="form-control" type="text" name="name"
value="{{ $item->paymentMode }}" readonly>
</div>
</div>
</div>
</div>
<div class="card border border-info w-25 h-25 mt-4">
<div class="card-header bg-secondary text-light">
<strong class="card-title"> Driver Details </strong>
<?php
for($i = 0; $i < $driverData->experience; $i++){
?>
<i class="fa fa-star ml-2 text-info "></i>
<?php } ?>
</div>
<div class="card-body">
<div class="form-group">
<label for="file-input" class=" form-control-label"> Current
Status</label>
<div class="form-control">
@if ($item->bookStatus == '0' && $item->status == '1')
<i class="fa fa-car text-secondary" aria-hidden="true"></i> Trip
Started
@elseif($item->bookStatus == '1')
<i class="fa fa-street-view text-info" aria-hidden="true"></i>
Arrived At Location
@elseif($item->bookStatus == '2')
<i class="fa fa-id-badge text-primary" aria-hidden="true"></i>
Pickup Customer
@elseif($item->bookStatus == '3')
<i class="fa fa-blind text-warning" aria-hidden="true"></i> Drop Customer
@elseif($item->bookStatus == '4')
<i class="fa fa-check text-success" aria-hidden="true"></i>
Payment Success
@elseif($item->bookStatus == '5')
<i class="fa fa-bell text-warning" aria-hidden="true"></i> Payment Due
@elseif($item->bookStatus == '6')
<i class="fa fa-times text-danger" aria-hidden="true"></i> SOS
@endif
</div>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Driver
Details:</label><br>
<label for="file-input" class=" form-control-label"> Driver Name</label>
<input class="form-control" type="text" name="name"
value="{{ findDri($item->driver_id) }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Phone No:</label>
<input class="form-control" type="text" name="phone"
value="{{ $driverData->phone }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label"> Car No:</label>
<input class="form-control" type="text" name="phone"
value="{{ $driverData->carNo }}" readonly>
</div>
<div class="form-group">
<label for="file-input" class=" form-control-label">Experience:</label>
<input class="form-control" type="text" name="phone"
value="{{$driverData->experience}} yrs" readonly>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}" readonly></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}" readonly></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}" readonly></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}" readonly></script>
</body>
</html>
<!-- end document-->
allDr_Cu.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>All User Roles</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">All Users Table</h2>
<a href="add_user_role" class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add now</a>
</div>
{{-- Search field --}}
<div class="justify-content-end d-flex mb-3">
<form action="usersrch" method="POST">
@csrf
<div class="form-check-inline">
<div class="col-sm-9">
<input type="text" placeholder="Search for Name or Email" class="form-control input-sm" id="srch" name="srch" @if(isset($srch2)) value={{$srch}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="srchval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<div class="mx-2">
<select name="userSel" id="select" class="form-control" onchange="urlHandler(this.value)">
<option value="/allDr_Cu">Please select All</option>
<option value="/userSel/customer" @if(isset($srch)) @if($srch=='customer') selected @endif @endif> Customer </option></a>
<option value="/userSel/driver" @if(isset($srch)) @if($srch=='driver') selected @endif @endif>Driver</option>
</select>
</div>
<script>
function urlHandler(value) {
window.location.assign(`${value}`);
}
</script>
{{-- <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
--}}
{{-- <script type="text/javascript">
$("document").ready(function () {
$('select[name="select"]').on('change', function () {
var catType = $(this).val();
console.log(catType);
if (catType) {
$.ajax({
url: '/allDr_CuJQ/' + catType,
type: "GET",
dataType: "json",
success: function (data) {
console.log('Data found from link'+ data);
// $('select[name="subcategory"]').empty();
// $.each(data, function (key, value) {
// $('select[name="subcategory"]').append('<td>' + value + '</td>');
// })
}
})
} else {
$('select[name="subcategory"]').empty();
}
});
});
</script> --}}
<script>
function srchval(){
data=document.getElementById('srch').value;
if(!data){
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
let pattern = /[^0-9]/g;
let result = data.match(pattern);
if( data.match(pattern)==null)
{
alert("Only Name and Email are allowed!");
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
{{-- srch fld ends --}}
<div class="table-responsive">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>Sr No.</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Image</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr name="subcategory"></tr>
<?php $c=1; ?>
@if(isset($users))
@if(count($users)>0)
@foreach($users as $user)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td> {{ $user->name}} </td>
<td> <span class="block-email">{{ $user->email}}</span> </td>
<td> <span class="status--process"> {{getRole( $user)}}</span> </td>
<td>
<img src="{{$user->image}}" alt="{{$user->name}} banner" height="60px" width="70px">
</td>
<td> @if($user->active)
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<form action="/user_role_edit" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Edit">
<i class="fa fa-edit text-dark"></i>
</button>
</form>
<form action="/user_role_delete" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</button>
</form>
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="7" class="text-center"> No Data Found</td>
@endif
@endif
@if(isset($drivers))
@if(count($drivers)>0)
@foreach($drivers as $user)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td> {{ $user->name}} </td>
<td> <span class="block-email">{{ $user->email}}</span> </td>
<td> <span class="status--process"> {{getRole( $user)}}</span> </td>
<td>
<img src="{{$user->image}}" alt="{{$user->name}} banner" height="60px" width="70px">
</td>
<td> @if($user->active)
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<form action="/user_role_edit" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Edit">
<i class="fa fa-edit text-dark"></i>
</button>
</form>
<form action="/user_role_delete" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</button>
</form>
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="7" class="text-center"> No Data Found</td>
@endif
@endif
</tbody>
</table>
</div>
<div class="text-right mx-5 my-2">
@if(isset($srch)) <a href="/allDr_Cu"> <i class="fa fa-reply"></i> Back to all</a> @endif
</div>
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
booking.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Bookings</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if (session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('status') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if (session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('error') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1 mr-5">Booking Table</h2>
<div class="justify-content-center d-flex my-3">
<form action="{{ route('BookingSrch') }}" method="GET">
<div class="form-check-inline">
<input type="text" placeholder="Search Now" class="form-control input-sm" id="srch" name="srch" @if (isset($srchbck)) value={{ $srchbck }} @endif>
<button type="submit" class="btn" title="search" onclick="srchval()"><i
class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script>
function srchval() {
data = document.getElementById('srch').value;
if (!data) {
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="justify-content-end d-flex">
<form action="bkk_date_srch" method="POST">
@csrf
<div class="form-check-inline">
<label for="date" class="col-form-label col-sm-0">From</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="fromdate" name="start_date" @if(isset($req)) value={{$req->start_date}} @endif >
</div>
<label for="date" class="col-form-label col-sm-0">To</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="todate" name="end_date" @if(isset($req)) value={{$req->end_date}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="dateval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function dateval(){
fromdate=document.getElementById('fromdate').value;
todate=document.getElementById('todate').value;
// console.log(fromdate);
// console.log(todate);
if (Date.parse(fromdate) > Date.parse(todate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
fromdate=Date;
event.preventDefault();
return false;
}
if(!fromdate || !todate){
alert("Date Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
</div>
<div class="table-responsive my-5">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th> Sr. No. </th>
<th> Car Name </th>
<th> Driver Name </th>
<th> Customer Name </th>
<th> Mobile </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Adults </th>
<th> Childs </th>
<th> Message </th>
<th> Payment Mode </th>
<th> Total </th>
<th> Available </th>
</tr>
</thead>
<tbody>
<?php $c = 1; ?>{{-- ['adeu' => $adfn, 'data'=>$data, 'cust'=>$cust, 'car'=>$car, 'driver'=>$driver --}}
@if(count($data)>0)
@foreach ($data as $item)
<tr @if ($item->available) style="background: #ebb96e5b" @endif>
<td>{{ $c++ }}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findDri($item->driver_id)}}</td>
<td>{{ findCust($item->customer_id)}}</td>
<td>{{ $item->mobile }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->drloc) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->putime }}</td>
<td>{{ $item->personAd }}</td>
<td>{{ $item->personCh }}</td>
<td>{{ $item->message }}</td>
<td>{{ $item->paymentMode }}</td>
<td>{{ $item->total }}</td>
<td>
@if ($item->bkkStatus=='1' || $item->status=='1')
<a href="/adShowTrip/{{$item->id}}" class='text-success' data-toggle="tooltip" data-placement="top" title="Show Ride"><i class="fa fa-desktop"> Booking Confirmed </i> </a>
@elseif($item->bkkStatus=='0'|| $item->status=='0')
<h5 class="text-dark">Booking Cancle</h5>
@else
<h5 class="text-info">No Response</h5>
@endif
</td>
</tr>
@endforeach
@else
<td colspan="10" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
@if(!isset($srchbck) )
@if(!isset($req))
<div class="d-flex justify-content-end my-4">
{{$data->links() }}
{{-- d-flex justify-content-end my-4 --}}
</div>
@endif
@endif
@if(isset($srchbck))
<div class="text-right mx-3 my-5">
<a href="readRequest"> <i class="fa fa-reply"></i> Show All</a>
</div>
@endif
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}"></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}"></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}"></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}"></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}"></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}"></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}"></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}"></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}"></script>
</body>
</html>
<!-- end document-->
car_edit.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Edit Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Edit Car Details </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 my-5 mx-auto">
<div class="row">
<div class="col-md-10 mt-5">
Recent Image
</div>
<div class="col-md-10">
<?php $imagex = explode(', ', $car->image) ?>
@foreach($imagex as $imag)
<img src="{{$imag}}" class="my-2" style="height:150px; width: 500px; border: 1px solid; border-radius:10px 25px; ">
@endforeach
</div>
</div>
</div>
<div class="col-md-6 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header bg-dark text-light">
<strong class="card-title">Car Details Edit Page </strong>
</div>
<div class="card-body">
<form action="/car_edit_ac" method="post" enctype="multipart/form-data" class="form-horizontal mt-3">
@csrf
<input type="hidden" name="pgimz" value="{{$car->image}}">
<input type="hidden" name="car_id" value="{{$car->id}}">
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="name" class="form-control" value="{{$car->name}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Brand</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="brand" class="form-control" value="{{$car->brand}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Car No</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="carNo" class="form-control" value="{{$car->carNo}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Person</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="person" class="form-control" value="{{$car->person}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Gear</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="gear" class="form-control" value="{{$car->gear}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Year</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="year" class="form-control" value="{{$car->year}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">KMPL</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="kmpl" class="form-control" value="{{$car->kmpl}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Car Runs</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="runs" class="form-control" value="{{$car->runs}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Features</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="features" class="form-control" value="{{$car->features}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Description</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="desc" class="form-control" value="{{$car->desc}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class="bg-warning form-control-label">Price/Day</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="price" class="form-control" value="{{$car->price}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Status</label>
</div>
<div class="col-12 col-md-9">
<input type="radio" id="file-input" name="status" class="mx-5" @if($car->status=='1') checked @endif value="1"> <span for="">Active</span>
<input type="radio" id="file-input" name="status" value="0" @if($car->status=="0") checked @endif class="mx-5"><span for="" >Inactive</span>
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label">Multiple Images</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="images[]" multiple="" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green " type="submit">UPDATE</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
carAdding.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Car Adding Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Add New Car </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header bg-warning">
<strong class="card-title"> Car Adding Form </strong>
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="card-body">
<form action="/car_added" method="post" enctype="multipart/form-data" class="form-horizontal mt-3">
@csrf
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="name" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Brand</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="brand" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Car No</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="carNo" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Person</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="person" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Gear</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="gear" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Year</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="year" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">KMPL</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="kmpl" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Car Runs</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="runs" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Features</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="features" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Description</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="desc" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class="bg-warning form-control-label">Price/Day</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="price" class="form-control">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Status</label>
</div>
<div class="col-12 col-md-9">
<input type="radio" id="file-input" name="status" class="mx-5" value="1"> <span for="">Active</span>
<input type="radio" id="file-input" name="status" value="0" class="mx-5"><span for="" >Inactive</span>
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label">Multiple Images</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="images[]" multiple="" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green " type="submit">Create</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
carList.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Car List</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">Car Table</h2>
<a href="addCars" class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add cars</a>
</div>
<div class="table-responsive">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>Sr No.</th>
<th>Name</th>
<th>Brand</th>
<th>Car No</th>
<th>Seats</th>
<th>Gear</th>
<th>Year</th>
<th>KMPL</th>
<th>Car Runs</th>
<th>Features</th>
<th>Description</th>
<th>Book</th>
<th>Image</th>
<th>Price</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@if(isset($cars) && count($cars)>0)
@foreach($cars as $car)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td> <span class="block-email">{{ $car->name}}</span> </td>
<td> {{ $car->brand}}</td>
<td> {{ $car->carNo}}</td>
<td> {{ $car->person}}</td>
<td>{{ $car->gear}}</td>
<td> {{ $car->year}}</td>
<td> {{ $car->kmpl}}</td>
<td> {{ $car->runs}}</td>
<td> {{ $car->features}}</td>
<td data-toggle="tooltip" data-placement="left" title=" {{$car->desc }}" > {{ substr($car->desc, 0, 15) }}</td>
<td> <span class="status--process"> @if($car->book) Booked @else Available @endif </span></td>
<td>
<?php $arr = explode(", ",$car->image); ?>
@foreach($arr as $card)
<img src="{{$card}}" alt="{{$car->name}} banner" height="60px" width="70px">
@endforeach
{{-- <img src="{{$car->image}}" alt="{{$car->name}} banner" height="60px" width="70px"> --}}
</td>
<td> ${{$car->price}}/Day</td>
<td>
@if($car->status)
<form action="{{route('acInacCars')}}" method="post">
@csrf
<input value="{{$car->id}}" type="hidden" name="car_id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acInacCars')}}" method="post">
@csrf
<input value="{{$car->id}}" type="hidden" name="car_id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<form action="/car_edit" method="post" >
@csrf
<input type="hidden" name="car_id" value="{{$car->id}}">
<input type="hidden" name="old_img" value="{{$car->image}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Edit">
<i class="fa fa-edit text-dark"></i>
</button>
</form>
<a href="carDelete/{{$car->id}}" class="item mx-3" data-toggle="tooltip" data-placement="top" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</a>
{{-- <a href="user_role_delete/{{$user['id']}}" class="btn btn-danger btn-sm text-light">Delete</a> --}}
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="17" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
changer.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Page Tables</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">Page Table</h2>
<a href="add_page" class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add page</a>
</div>
<div class="table-responsive table-responsive-data2">
<table class="table table-data3 table-earning">
<thead>
<tr>
<th>Sr No.</th>
<th>Page</th>
<th>Title</th>
<th>Image</th>
{{-- <th>Active</th> --}}
<th>Change Status</th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@foreach($pages as $page)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td>{{ $page->page}}</td>
<td>
<span class="block-email">{{ $page->title}}</span>
</td>
<td class="desc">
<?php $arr = explode(", ",$page->image); ?>
@foreach($arr as $card)
<img src="{{$card}}" alt="{{$page->title}} banner" height="60px" width="70px">
@endforeach
</td>
{{-- <td class="desc">
@if($page->active)
<button class="item mx-4" data-toggle="tooltip" data-placement="top" title="active">
{{ $page->active}} Yes
</button>
@else
<button class="item mx-4" data-toggle="tooltip" data-placement="top" title="inactive">
{{ $page->active}} No
</button>
@endif
</td> --}}
<td>
<div class="table-data-feature justify-content-center">
@if($page->active)
<form action="{{route('acinacfmac')}}" method="post">
@csrf
<input value="{{$page->id}}" type="hidden" name="id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acinacfmac')}}" method="post">
@csrf
<input value="{{$page->id}}" type="hidden" name="id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
<form action="/pggedit" method="post" >
@csrf
<input type="hidden" name="pggid" value="{{$page->id}}">
<button class="btn btn-info btn-sm mx-2 text-light">
<i class="zmdi zmdi-edit"></i> Edit
</button>
</form>
<a href="deletepage/{{$page->id}}" class="btn btn-danger btn-sm text-light">Delete</a>
{{--
<button class="item" data-toggle="tooltip" data-placement="top" title="Delete">
<i class="zmdi zmdi-delete"></i>
</button>
<button class="item" data-toggle="tooltip" data-placement="top" title="More">
<i class="zmdi zmdi-more"></i>
</button> --}}
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
</tbody>
</table>
</div>
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
chnps.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Change Password</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Change Password </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-7 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header">
<strong class="card-title">Change Password</strong>
</div>
<div class="card-body">
<form action="/adpassupdate" method="post" id="basic-form">
@csrf
<input type="hidden" name="adid" value="{{$adeu->id}}">
<input type="hidden" name="ademail" value="{{$adeu->email}}">
<div class="form-group">
<label>Old Password</label>
<input class="au-input au-input--full" type="text" name="op" id="op" placeholder="Old Password">
</div>
<div class="form-group">
<label>New Password</label>
<input class="au-input au-input--full" type="text" name="np" id="np" placeholder="New Password" >
</div>
<div class="form-group">
<label for="">Confirm Password</label>
<input class="au-input au-input--full" type="text" name="cp" id="cp" placeholder="Confirm Password" >
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Update</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
drEarnings.blade.php
<base href="/public">
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<title>Driver Earnings</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
{{-- carousel --}}
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row ">
<div class="col-12">
<div class="overview-wrap mb-5">
<h2 class="title-1 mr-5">Sales Report</h2>
<div class="my-2 ">
<form action="{{ route('bkkSrch') }}" method="GET">
<div class="form-check-inline">
@if(isset($srMnth))
<input type="hidden" name="month" value="{{$srMnth}}">
@endif
<input type="text" placeholder="Search via Driver name" class="form-control input-sm" id="srch" name="srch" @if (isset($srchbck)) value={{ $srchbck }} @endif>
<button type="submit" class="btn" title="search" onclick="srchval()"><i
class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script>
function srchval() {
data = document.getElementById('srch').value;
if (!data) {
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="my-2 ">
<form action="/earning_date_srch" method="POST">
@csrf
@if(isset($srchbck))
<input type="hidden" name="srch" value="{{$srchbck}}">
@endif
<div class="form-check-inline">
<select class="form-control" name="month" id="month" required>
<option disabled="disabled" @if(!isset($srMnth)) selected="selected" @endif value="">Select Month</option>
<option value="1" @if(isset($srMnth)) @if($srMnth=='1') selected @endif @endif>January</option>
<option value="2" @if(isset($srMnth)) @if($srMnth=='2') selected @endif @endif>February</option>
<option value="3" @if(isset($srMnth)) @if($srMnth=='3') selected @endif @endif>March</option>
<option value="4" @if(isset($srMnth)) @if($srMnth=='4') selected @endif @endif>April</option>
<option value="5" @if(isset($srMnth)) @if($srMnth=='5') selected @endif @endif>May</option>
<option value="6" @if(isset($srMnth)) @if($srMnth=='6') selected @endif @endif>June</option>
<option value="7" @if(isset($srMnth)) @if($srMnth=='7') selected @endif @endif>July</option>
<option value="8" @if(isset($srMnth)) @if($srMnth=='8') selected @endif @endif>August</option>
<option value="9" @if(isset($srMnth)) @if($srMnth=='9') selected @endif @endif>September</option>
<option value="10"@if(isset($srMnth)) @if($srMnth=='10') selected @endif @endif>October</option>
<option value="11" @if(isset($srMnth))@if($srMnth=='11') selected @endif @endif>November</option>
<option value="12"@if(isset($srMnth)) @if($srMnth=='12') selected @endif @endif>December</option>
</select>
<button type="submit" class="btn"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
<form action="/excelExport" method="post">
@csrf
<input type="hidden" name="data" value="{{$data}}">
<button class="btn btn-outline-info">Export <i class="fa fa-arrow-right"></i> </button>
</form>
</div>
<div class="table-responsive my-5 ">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th> Sr. No. </th>
<th> Driver Name </th>
<th> Customer Name </th>
<th> Date </th>
<th> Payment Mode </th>
<th> Income </th>
<th> Status </th>
</tr>
</thead>
<tbody>
<?php $c = 1;
$t = 0; ?>
@if (count($data) > 0)
@foreach ($data as $item)
<tr>
<td>{{ $c++ }}</td>
<td>{{ findDri($item->driver_id) }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->paymentMode }}</td>
<td>$ {{ $item->total }}.00</td>
<td>
@if ($item->bookStatus == '4' && $item->status == '1')
<h5> Completed </h5>
@elseif($item->bookStatus == '0' && $item->status == '0')
<h5 class="text-danger">Booking Cancel</h5>
@elseif($item->bookStatus == '5')
Payment Due
@elseif($item->bookStatus == '3' || $item->bookStatus == '2' || $item->bookStatus == '1')
Ongoing Process
@else
<h5 class="text-info">No Response</h5>
@endif
</td>
<?php
if ($item->bookStatus == '4' && $item->status == '1') {
$t = $t + $item->total;
}
?>
</tr>
@endforeach
@else
<td colspan="10" class="text-center"> No Data Found</td>
@endif
</tbody>
<tfoot>
<tr class="bg-secondary">
<td colspan="5" class="text-center">
<h4 class="text-light"> Grand Total =</h4>
</td>
<td colspan="2">
<h4 class="text-light " id="total_order">$ {{ $t }}.00 </h4>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="text-right container text-success">
@if(isset($srMnth)) <a href="/drEarnings"> <i class="fa fa-reply"></i> Back to all</a> @endif
</div>
</div>
{{--
<div class="col-12">
<div class="d-flex justify-content-around">
@foreach ($driver_info as $dr_info)
<aside class="profile-nav alt">
<section class="card">
<div class="card-header user-header alt bg-dark">
<div class="media">
<a href="#">
<img class="align-self-center rounded-circle mr-3" style="width:85px; height:85px;" alt="" src="{{ driver_details('image', $dr_info->driver_id)}}">
</a>
<div class="media-body">
<h2 class="text-light display-6"> {{ findDri($dr_info->driver_id) }} </h2>
<p class="text-light">Experience: {{ driver_details('experience', $dr_info->driver_id)}} </p>
<p class="text-light">Income: $ {{$dr_info->income}}.00 </p>
</div>
</div>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="#">
<i class="fa fa-users"></i> On Requests
<span class="badge badge-primary pull-right">{{driver_details('request', $dr_info->driver_id)}}</span>
</a>
</li>
<li class="list-group-item">
<a href="#">
<i class="fa fa-tasks"></i> Total Bookings
<span class="badge badge-danger pull-right">{{ $dr_info->total}}</span>
</a>
</li>
<li class="list-group-item">
<a href="#">
<i class="fa fa-calendar"></i> Working Days
<span class="badge badge-success pull-right">{{driver_details('workingDay', $dr_info->driver_id)}}</span>
</a>
</li>
<li class="list-group-item">
<a href="#">
<i class="fa fa-globe"></i> No of Customers
<span class="badge badge-warning pull-right r-activity">{{driver_details('customer', $dr_info->driver_id)}}</span>
</a>
</li>
</ul>
</section>
</aside>
@endforeach
</div>
</div> --}}
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}" readonly></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}" readonly></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}" readonly></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}" readonly></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}" readonly></script>
</body>
</html>
<!-- end document-->
driver_role.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Driver Roles</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
</div>
</div>
<div class="row mb-5">
<div class="col-md-12">
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">Driver Table</h2>
<a href="add_user_role" class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add now</a>
</div>
{{-- Search field --}}
<div class="justify-content-end d-flex mb-3">
<form action="usersrch" method="POST">
@csrf
<div class="form-check-inline">
<div class="col-sm-9">
<input type="text" placeholder="Search for Name or Email" class="form-control input-sm" id="driver_srch" name="driver_srch" @if(isset($srch)) value={{$srch}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="srchval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function srchval(){
data=document.getElementById('driver_srch').value;
if(data=='') {
alert("Please Search for Name or Email")
event.preventDefault();
return false;
}
let pattern = /[^0-9]/g;
let result = data.match(pattern);
if( data.match(pattern)==null)
{
alert("Only Name and Email are allowed!");
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
{{-- srch fld ends --}}
<div class="table-responsive">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>Sr No.</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Image</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@if(count($drivers)>0)
@foreach($drivers as $user)
<tr class="tr-shadow">
<td> {{$c++;}} </td>
<td> {{ $user->name}} </td>
<td> <span class="block-email">{{ $user->email}}</span> </td>
<td> <span class="status--process"> {{getRole( $user)}} </span> </td>
<td>
<img src="{{$user->image}}" alt="{{$user->name}} banner" height="60px" width="70px">
</td>
<td> @if($user->active)
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="driver_id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="driver_id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<form action="/user_role_edit" method="post" >
@csrf
<input type="hidden" name="driver_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Edit">
<i class="fa fa-edit text-dark"></i>
</button>
</form>
<form action="/user_role_delete" method="post" >
@csrf
<input type="hidden" name="driver_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</button>
</form>
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="7" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
<!-- END DATA TABLE -->
</div>
<div class="text-right mx-5 my-2">
@if(isset($srch)) <a href="/driverList"> <i class="fa fa-reply"></i> Back to all</a> @endif
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
editpage.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Edit Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Edit Page Banner & Title </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header">
<strong class="card-title">Banner Edit Page </strong>
</div>
<div class="card-body">
<form action="/editpggac" method="post" enctype="multipart/form-data" class="form-horizontal my-5">
@csrf
<input type="hidden" name="adid" value="{{$pg->id}}">
<input type="hidden" name="pgimz" value="{{$pg->image}}">
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="pgpage" class="form-control" value="{{$pg->page}}" readonly>
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Title</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="pgtitle" class="form-control" value="{{ $pg->title}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Page Active</label>
</div>
<div class="col-12 col-md-9">
<input type="radio" id="file-input" name="pgact" class="mx-5" value="1" @if($pg->active==1) checked @endif> <span for="">Active</span>
<input type="radio" id="file-input" name="pgact" value="0" class="mx-5" @if($pg->active==0) checked @endif><span for="">Inactive</span>
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label">Multiple File input</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="images[]" multiple="" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Update</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
forget_pass.blade.php
@include('admin.adcommon.header')
<head>
<!-- Title Page-->
<title>Forget Password</title>
</head>
{{-- @include('admin.adcommon.sidemenu') @include('admin.adcommon.ftrjq')--}}
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="#">
<img src="images/icon/logo.png" alt="CoolAdmin">
</a>
</div>
<div class="login-form">
<form action="" method="post">
<div class="form-group">
<label>Email Address</label>
<input class="au-input au-input--full" type="email" name="email" placeholder="Email">
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@include('admin.adcommon.ftrjq')
index.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Dashboard</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('message'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('message')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">overview </h2>
<button class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add item</button>
</div>
</div>
</div>
<div class="row m-t-25">
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c1">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-account-o"></i>
</div>
<div class="text">
<h2>{{$data['driverCnt'] }}</h2>
<span>No of Active Drivers</span>
</div>
</div>
<div class="overview-chart"><div style="position: absolute; inset: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;" class="chartjs-size-monitor"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>
<canvas id="widgetChart1" style="display: block;" class="chartjs-render-monitor" width="187" height="130"></canvas>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c2">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-car"></i>
</div>
<div class="text">
<h2>{{ $data['carCnt'] }}</h2>
<span>No of Cars</span>
</div>
</div>
<div class="overview-chart"><div style="position: absolute; inset: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;" class="chartjs-size-monitor"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>
<canvas id="widgetChart2" style="display: block; width: 187px; height: 115px;" class="chartjs-render-monitor" width="187" height="115"></canvas>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c3">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-calendar-note"></i>
</div>
<div class="text">
<h2> {{ $data['bkngCnt'] }}</h2>
<span>Active Bookings</span>
</div>
</div>
<div class="overview-chart"><div style="position: absolute; inset: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;" class="chartjs-size-monitor"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>
<canvas id="widgetChart3" style="display: block; width: 187px; height: 115px;" class="chartjs-render-monitor" width="187" height="115"></canvas>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-3">
<div class="overview-item overview-item--c4">
<div class="overview__inner">
<div class="overview-box clearfix">
<div class="icon">
<i class="zmdi zmdi-money"></i>
</div>
<div class="text">
<h2>${{$data['total'] }}</h2>
<span>Total Income</span>
</div>
</div>
<div class="overview-chart"><div style="position: absolute; inset: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;" class="chartjs-size-monitor"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>
<canvas id="widgetChart4" style="display: block;" class="chartjs-render-monitor" width="187" height="115"></canvas>
</div>
</div>
</div>
</div>
</div>
{{-- <div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2018 Colorlib. All rights reserved. Template by <a href="https://colorlib.com">Colorlib</a>.</p>
</div>
</div>
</div> --}}
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
login.blade.php
@include('admin.adcommon.header')
<head>
<title>Login</title>
</head>
{{-- @include('admin.adcommon.sidemenu') --}}
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
@if(Session::has('wrlgcr'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{ Session::get('wrlgcr') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="#">
<img src="{{ asset('admin/images/icon/logo.png') }} " alt="CoolAdmin">
</a>
</div>
<div class="login-form">
<form action="/adlgac" method="post">
@csrf
<div class="form-group">
<label>Email Address</label>
<input class="au-input au-input--full" type="email" name="email" placeholder="Email">
</div>
<div class="form-group">
<label>Password</label>
<input class="au-input au-input--full" type="password" name="password" placeholder="Password">
</div>
<div class="login-checkbox">
<label>
<input type="checkbox" name="remember">Remember Me
</label>
<label>
<a href="adforget_pass">Forgotten Password?</a>
</label>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">sign in</button>
</form>
<div class="register-link">
<p>
<a href="/" class="mx-5"> <i class="fa fa-reply"></i> Back</a>
Don't you have account?
<a href="adregister">Sign Up Here</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@include('admin.adcommon.ftrjq')
mail.blade.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="telephone=no" name="format-detection">
<title></title>
</head>
<body>
<div class="es-wrapper-color">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" color="#ffffff"></v:fill>
</v:background>
<![endif]-->
<table class="es-wrapper" style="background-position: center top;" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-email-paddings" valign="top">
<table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="esd-stripe" esd-custom-block-id="15906" align="center">
<table class="es-content-body" style="background-color: #000000;" width="600" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">
<tbody>
<tr>
<td class="esd-structure" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="600" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text es-p15" align="center">
<h1 style="color: #ffffff;"><strong>Hello {{ $adminMail['name'] }}, </strong><br></h1>
</td>
</tr>
<tr class="es-visible-simple-html-only">
<td class="esd-block-banner" style="position: relative;" align="center" esdev-config="h2"><a target="_blank" href="https://viewstripo.email/"><img class="adapt-img esdev-stretch-width esdev-banner-rendered" src="https://demo.stripocdn.email/content/guids/bannerImgGuid/images/image16660004820249468.png" alt="ds" title="ds" width="100%"></a></td>
</tr>
<tr>
<td class="esd-block-social" style="font-size:0" align="center">
<table class="es-table-not-adapt es-social" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="es-p10r" valign="top" align="center"><a target="_blank" href><img src="https://stripo.email/static/assets/img/social-icons/circle-colored/twitter-circle-colored.png" alt="Tw" title="Twitter" width="32"></a></td>
<td class="es-p10r" valign="top" align="center"><a target="_blank" href><img src="https://stripo.email/static/assets/img/social-icons/circle-colored/facebook-circle-colored.png" alt="Fb" title="Facebook" width="32"></a></td>
<td class="es-p10r" valign="top" align="center"><a target="_blank" href><img src="https://stripo.email/static/assets/img/social-icons/circle-colored/youtube-circle-colored.png" alt="Yt" title="Youtube" width="32"></a></td>
<td valign="top" align="center"><a target="_blank" href><img src="https://stripo.email/static/assets/img/social-icons/circle-colored/vk-circle-colored.png" alt="VK" title="Vkontakte" width="32"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
mailbox.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Mail Box</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('message'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('message')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Mail Box </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="my-5">
<!-- DATA TABLE -->
<div class="justify-content-end d-flex mb-3">
<form action="mailsrch" method="POST">
@csrf
<div class="form-check-inline">
<label for="date" class="col-form-label col-sm-0">From</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="fromdate" name="start_date" @if(isset($req)) value={{$req->start_date}} @endif >
</div>
<label for="date" class="col-form-label col-sm-0">To</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="todate" name="end_date" @if(isset($req)) value={{$req->end_date}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="dateval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function dateval(){
fromdate=document.getElementById('fromdate').value;
todate=document.getElementById('todate').value;
// console.log(fromdate);
// console.log(todate);
if (Date.parse(fromdate) > Date.parse(todate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
fromdate=Date;
event.preventDefault();
return false;
}
if(!fromdate || !todate){
alert("Date Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="table-responsive m-b-40">
<table class="table table-data3">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Date</th> {{-- created_at --}}
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Subject</th>
<th scope="col">Message</th>
<th scope="col">Reply</th>
<th scope="col">Action</th>
<?php $c=1; ?>
</tr>
</thead>
<tbody>
@if(count($data)==0)
<td colspan="8" class="text-center"> <h6>No Data Found</h6> </td>
@endif
@foreach($data as $seu)
<tr>
<td scope="col"><?php echo $c++; ?></td>
<td scope="col"> {{ $seu['created_at'] }} </td>
<td scope="col"> {{ $seu['name'] }} </td>
<td scope="col" style=" text-overflow: ellipsis; word-wrap: break-word; overflow: hidden; max-width: 2em;"> {{ $seu['email'] }} </td>
<td scope="col" style=" text-overflow: ellipsis; word-wrap: break-word; overflow: hidden; max-width: 2em;"> {{ $seu['subject'] }}</td>
<td scope="col" style=" text-overflow: ellipsis; word-wrap: break-word; overflow: hidden; max-width: 2em;"> {{ $seu['message'] }} </td>
<td scope="col">
@if($seu['status']==0)
<span class="badge badge-danger float-right mt-1 mb-1"> <h5 class="text-light"> New </h5></span>
@else
<span class="badge badge-info float-right mt-1 mb-1"> <h5> Replied </h5></span>
@endif
</td>
<td>
<a href="{{url('mail_rply',$seu['id'])}}" class='text-info p-2'> <i class="fa fa-reply" aria-hidden="true"></i></a>
{{-- <a href="{{url('admailsend',$seu['id'])}}" class='text-info p-2'> <i class="fa fa-paper-plane" aria-hidden="true"></i></a> --}}
<a href="" class='text-danger p-2'><i class="fa fa-trash" aria-hidden="true"></i></a>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
</tr>
</tbody>
</table>
<div class="d-flex justify-content-end my-4">
{{$data->links() }}
{{-- d-flex justify-content-end my-4 --}}
</div>
</div>
<!-- END DATA TABLE -->
<!-- display ends -->
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
mailreply.blade.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta name="x-apple-disable-message-reformatting">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="telephone=no" name="format-detection">
<title></title>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="es-wrapper-color">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" color="#FFE7F3"></v:fill>
</v:background>
<![endif]-->
<table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-email-paddings" valign="top">
<table class="esd-header-popover es-header" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="esd-stripe" align="center">
<table class="es-header-body" style="border-left:4px solid #ffffff;border-right:4px solid #ffffff;border-top:4px solid #ffffff;border-bottom:4px solid #ffffff;" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center">
<tbody>
<tr>
<td class="esd-structure es-p20" esd-custom-block-id="740648" align="left">
<!--[if mso]><table width="552" cellpadding="0" cellspacing="0"><tr><td width="150" valign="top"><![endif]-->
<table class="es-left" cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<td class="es-m-p0r esd-container-frame es-m-p20b" width="150" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="left">
<p><br><no.reply@royalcars.com></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td><td width="20"></td><td width="382" valign="top"><![endif]-->
<table class="es-right" cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr>
<td class="esd-container-frame" width="382" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="left">
<p style="font-size: 48px; font-family: 'playfair display', georgia, 'times new roman', serif;"><strong><em> ROYAL CARS</em></strong><br></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td class="esd-stripe" align="center">
<table class="es-content-body" style="border-left:4px solid #ffffff;border-right:4px solid #ffffff;" width="600" cellspacing="0" cellpadding="0" bgcolor="#D8599E" align="center">
<tbody>
<tr>
<td class="esd-structure" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="592" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-image" style="font-size: 0px;" align="center"><a target="_blank" href="https://viewstripo.email"><img class="adapt-img" src="https://tlr.stripocdn.email/content/guids/CABINET_17414fab6e31e9aa151544b147dab92e/images/30829710_7742029.png" alt="Hocus pocus" style="display: block;" title="Hocus pocus" width="592"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="esd-structure es-p40b es-p20r es-p20l" style="background-color: #d8599e;" bgcolor="#D8599E" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="552" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-text" align="center">
<p style="font-size: 22px; font-family: arial, 'helvetica neue', helvetica, sans-serif;"><strong>{{$AdminReply['message']}}</strong></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="esd-structure" align="left">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-container-frame" width="592" valign="top" align="center">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="esd-block-image" style="font-size: 0px;" align="center"><a target="_blank" href="https://viewstripo.email"><img class="adapt-img" src="https://tlr.stripocdn.email/content/guids/CABINET_17414fab6e31e9aa151544b147dab92e/images/7742035_kVr.png" alt="Happy Halloween" style="display: block;" title="Happy Halloween" width="592"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
readRequest.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>All Requests</title>
<!-- Fontfaces CSS-->
<link href="{{ asset('admin/css/font-face.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs') }}s" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css') }}" rel="stylesheet"
media="all">
<!-- Bootstrap CSS-->
<link href="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.css') }}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{ asset('admin/vendor/animsition/animsition.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css') }}" rel="stylesheet"
media="all">
<link href="{{ asset('admin/vendor/wow/animate.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/css-hamburgers/hamburgers.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/slick/slick.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/select2/select2.min.css') }}" rel="stylesheet" media="all">
<link href="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css') }}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{ asset('admin/css/theme.css') }}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if (session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('status') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if (session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{ session()->get('error') }}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1 mr-5">Availability Table</h2>
<div class="justify-content-center d-flex my-3">
<form action="{{ route('RequestSrch') }}" method="GET">
<div class="form-check-inline">
<input type="text" placeholder="Search Now" class="form-control input-sm" id="srch" name="srch" @if (isset($srchbck)) value={{ $srchbck }} @endif>
<button type="submit" class="btn" title="search" onclick="srchval()"><i
class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script>
function srchval() {
data = document.getElementById('srch').value;
if (!data) {
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
<div class="justify-content-end d-flex">
<form action="avai_date_srch" method="POST">
@csrf
<div class="form-check-inline">
<label for="date" class="col-form-label col-sm-0">From</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="fromdate" name="start_date" @if(isset($req)) value={{$req->start_date}} @endif >
</div>
<label for="date" class="col-form-label col-sm-0">To</label>
<div class="col-sm-5">
<input type="date" class="form-control input-sm" id="todate" name="end_date" @if(isset($req)) value={{$req->end_date}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="dateval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function dateval(){
fromdate=document.getElementById('fromdate').value;
todate=document.getElementById('todate').value;
// console.log(fromdate);
// console.log(todate);
if (Date.parse(fromdate) > Date.parse(todate)) {
alert("Invalid Date Range!\nStart Date cannot be after End Date!")
fromdate=Date;
event.preventDefault();
return false;
}
if(!fromdate || !todate){
alert("Date Fields are Empty!");
event.preventDefault();
return false;
}
}
</script>
</div>
</div>
{{-- Search field --}}
{{-- srch fld ends --}}
<div class="table-responsive my-5">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th> Sr. No. </th>
<th> Customer </th>
<th> Driver </th>
<th> Car No </th>
<th> Pickup Location </th>
<th> Drop Location </th>
<th> Pickup Date </th>
<th> Pickup Time </th>
<th> Mail </th>
<th> Available </th>
</tr>
</thead>
<tbody>
<?php $c = 1; ?>{{-- ['adeu' => $adfn, 'data'=>$data, 'cust'=>$cust, 'car'=>$car, 'driver'=>$driver --}}
@if(count($data)>0)
@foreach ($data as $item)
<tr @if ($item->available) style="background: #ebb96e5b" @endif>
<td>{{ $c++ }}</td>
<td>{{ findCust($item->customer_id) }}</td>
<td>{{ findDri($item->driver_id)}}</td>
<td>{{ findCar($item->car_id) }}</td>
<td>{{ findLoc($item->puloc) }}</td>
<td>{{ findLoc($item->droploc) }}</td>
<td>{{ $item->pudate }}</td>
<td>{{ $item->putime }}</td>
<td>
@if ($item->mail)
<h5 class="text-success">Mail sent</h5>
@else
<h5 class="text-info">No Mails</h5>
@endif
</td>
<td>
@if ($item->available == null)
<h5 class="text-info">No response</h5>
@else
@if($item->available == 1)
<h5 class="text-primary">Available</h5>
@elseif($item->available == 2)
<h5 class="text-secondary">Booking Done</h5>
@elseif($item->available == 3)
<h5 class="text-success">Booking Confirmed</h5>
@elseif($item->available == 0 || $item->available == 5 )
<h5 class="text-danger">Rejected</h5>
@endif
@endif
</td>
</tr>
@endforeach
@else
<td colspan="10" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
@if(!isset($srchbck))
@if(!isset($req))
<div class="d-flex justify-content-end my-4">
{{$data->links() }}
</div>
@endif
@endif
@if(isset($srchbck))
<div class="text-right mx-3 my-5">
<a href="readRequest"> <i class="fa fa-reply"></i> Show All</a>
</div>
@endif
@if(isset($req))
<div class="text-right mx-3 my-5">
<a href="readRequest"> <i class="fa fa-reply"></i> Show All</a>
</div>
@endif
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{ asset('admin/vendor/jquery-3.2.1.min.js') }}"></script>
<!-- Bootstrap JS-->
<script src="{{ asset('admin/vendor/bootstrap-4.1/popper.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-4.1/bootstrap.min.js') }}"></script>
<!-- Vendor JS -->
<script src="{{ asset('admin/vendor/slick/slick.min.js') }}"></script>
<script src="{{ asset('admin/vendor/wow/wow.min.js') }}"></script>
<script src="{{ asset('admin/vendor/animsition/animsition.min.js') }}"></script>
<script src="{{ asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.waypoints.min.js') }}"></script>
<script src="{{ asset('admin/vendor/counter-up/jquery.counterup.min.js') }}"></script>
<script src="{{ asset('admin/vendor/circle-progress/circle-progress.min.js') }}"></script>
<script src="{{ asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
<script src="{{ asset('admin/vendor/chartjs/Chart.bundle.min.js') }}"></script>
<script src="{{ asset('admin/vendor/select2/select2.min.js') }}"></script>
<!-- Main JS-->
<script src="{{ asset('admin/js/main.js') }}"></script>
</body>
</html>
<!-- end document-->
register.blade.php
@include('admin.adcommon.header')
<head>
<!-- Title Page-->
<title>Register</title>
</head>
{{-- @include('admin.adcommon.sidemenu') --}}
<body class="animsition">
<div class="page-wrapper">
<div class="page-content--bge5">
<div class="container">
<div class="login-wrap">
<div class="login-content">
<div class="login-logo">
<a href="#">
<img src="{{ asset('admin/images/icon/logo.png') }} " alt="CoolAdmin">
</a>
</div>
<div class="login-form">
<form action="/adfrinac" method="post" id="basic-form" enctype="multipart/form-data">
@csrf
<div class="form-group">
<label>Username</label>
<input class="au-input au-input--full" type="text" name="name" id="name" placeholder="Username">
</div>
<div class="form-group">
<label>Email Address</label>
<input class="au-input au-input--full" type="email" name="email" id="email" placeholder="Email">
</div>
<div class="form-group">
<label>Password</label>
<input class="au-input au-input--full" type="password" name="password" id="password" placeholder="Password">
</div>
<div class="form-group">
<label>Upload Image</label>
<input type="file" name="adimg" id="adimg" class="au-input">
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">register</button>
</form>
<style>
label.error {
color: red;
font-size: 1rem;
display: block;
margin-top: 5px;
}
label.error.fail-alert {
border: 2px solid red;
border-radius: 4px;
line-height: 1;
padding: 2px 0 6px 6px;
background: #ffe6eb;
}
input.valid.success-alert {
border: 2px solid #4CAF50;
color: green;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script>
$(document).ready(function() {
$("#basic-form").validate({
errorClass: "error fail-alert",
validClass: "valid success-alert",
rules: {
name : {
required: true,
minlength: 3
},
email: {
required: true,
email: true,
},
password: {
required: true,
},
adimg:{
required: true,
extension: "jpg|jpeg|png|ico|bmp"
}
},
messages : {
name: {
minlength: "Name should be at least 3 characters"
},
email: {
email: "The email should be in the format: abc@domain.tld",
required: "** Fill it right now!",
unique: "** Change it right now!",
},
password: {
required: "Please fill password",
},
}
});
});
</script>
<div class="register-link">
<p>
Already have account?
<a href="adlogin">Sign In</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
reply_mail.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>Mail Reply Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">Mail Reply Page </h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body --}}
<div class="card border border-secondary">
<div class="card-header">
<strong class="card-title">Mail Reply Page </strong>
</div>
<div class="card-body">
<form action="/admailsend" method="post" class="form-horizontal my-5">
@csrf
<input type="hidden" id="file-input" name="sid" class="form-control" value="{{$enrr->id}}">
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Sender Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="subject" class="form-control" value="{{$enrr->name}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Sender Subject</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="subject" class="form-control" value="{{$enrr->subject}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Sender Message</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="message" class="form-control" value="{{$enrr->message}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label">Reply Him/Her</label>
</div>
<div class="col-12 col-md-9">
<textarea cols="3" type="textarea" id="file-input" name="rply" class="form-control" value=""></textarea>
</div>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Send Reply</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
testimonials.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>Testimonials List</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">User Reviews</h2>
</div>
<div class="table-responsive">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>Sr No.</th>
<th>Customer Name</th>
{{-- <th>Booking No</th> --}}
<th>Message</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@if(isset($testis) && count($testis)>0)
@foreach($testis as $t)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td> <span class="block-email">{{ findCustomer($t->book_id)}}</span> </td>
{{-- <td> <span class="block-email">{{ $t->book_id}}</span> </td> --}}
<td> {{ $t->message}}</td>
<td>
@if($t->status)
<form action="/testiAcIn" method="post">
@csrf
<input value="{{$t->id}}" type="hidden" name="t_id">
<input value="inactive" type="hidden" name="type">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="/testiAcIn" method="post">
@csrf
<input value="{{$t->id}}" type="hidden" name="t_id">
<input value="active" type="hidden" name="type">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<a href="delTestimonial/{{$t->id}}" class="item mx-3" data-toggle="tooltip" data-placement="top" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</a>
{{-- <a href="user_role_delete/{{$user['id']}}" class="btn btn-danger btn-sm text-light">Delete</a> --}}
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="17" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
user_edit_roles.blade.php
@include('admin.adcommon.header')
<head>
<!-- D Page-->
<title>User Role Edit Page</title>
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('wrlgcr'))
<div class="alert alert-warning text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('wrlgcr')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<div class="overview-wrap">
<h2 class="title-1">User Role Edit Page</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="copyright">
{{-- body 'adeu' => $adfn, 'user'=> $usr , 'eduall' => $rolesall, 'data2' =>$data2 --}}
<div class="card border border-info">
<div class="card-header bg-info text-light">
<strong class="card-title">User Role Edit Page</strong>
<span style="float:right;" class="btn btn-dark text-light"> {{$data2[0]->title}} </span>
</div>
<div class="card-body">
<form action="/edit_ac_user_role" method="post" enctype="multipart/form-data" class="form-horizontal my-5">
@csrf
<input type="hidden" name="isUser" value="{{$isUser}}">
<input type="hidden" name="adid" value="{{$user->id}}">
<input type="hidden" name="pgimz" value="{{$user->image}}">
<input type="hidden" name="old_role" value="{{$user->role_id}}">
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Name</label>
</div>
<div class="col-12 col-md-9">
<input type="text" id="file-input" name="name" class="form-control" value="{{$user->name}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-input" class=" form-control-label"> Email</label>
</div>
<div class="col-12 col-md-9">
<input type="email" id="file-input" name="email" class="form-control" value="{{$user->email}}">
</div>
</div>
<div class="row form-group">
<div class="col col-md-3">
<label for="file-multiple-input" class=" form-control-label"> Set New Image</label>
</div>
<div class="col-12 col-md-9">
<input type="file" id="file-multiple-input" name="image" class="form-control">
</div>
</div>
<button class="au-btn au-btn--block au-btn--green m-b-20" type="submit">Update</button>
</form>
</div>
</div>
{{-- body ends--}}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END MAIN CONTENT-->
<!-- END PAGE CONTAINER-->
</div>
</div>
<!-- Jquery JS-->
@include('admin.adcommon.ftrjq')
user_roles.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="au theme template">
<meta name="author" content="Hau Nguyen">
<meta name="keywords" content="au theme template">
<!-- Title Page-->
<title>User Roles</title>
<!-- Fontfaces CSS-->
<link href="{{asset('admin/css/font-face.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-4.7/css/font-awesome.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/font-awesome-5/css/fontawesome-all.min.cs')}}s" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/mdi-font/css/material-design-iconic-font.min.css')}}" rel="stylesheet" media="all">
<!-- Bootstrap CSS-->
<link href="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.css')}}" rel="stylesheet" media="all">
<!-- Vendor CSS-->
<link href="{{asset('admin/vendor/animsition/animsition.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/wow/animate.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/css-hamburgers/hamburgers.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/slick/slick.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/select2/select2.min.css')}}" rel="stylesheet" media="all">
<link href="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.css')}}" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="{{asset('admin/css/theme.css')}}" rel="stylesheet" media="all">
</head>
@include('admin.adcommon.sidemenu')
<!-- MAIN CONTENT-->
<div class="main-content">
<div class="section__content section__content--p30">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
@if(session()->has('status'))
<div class="alert alert-success text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('status')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@if(session()->has('error'))
<div class="alert alert-danger text-center alert-dismissible fade show" role="alert">
<strong>{{session()->get('error')}}</strong>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
<!-- DATA TABLE -->
<div class="overview-wrap mb-5">
<h2 class="title-1">Users Table</h2>
<a href="add_user_role" class="au-btn au-btn-icon au-btn--blue">
<i class="zmdi zmdi-plus"></i>add now</a>
</div>
{{-- Search field --}}
<div class="justify-content-end d-flex mb-3">
<form action="usersrch" method="POST">
@csrf
<div class="form-check-inline">
<div class="col-sm-9">
<input type="text" placeholder="Search for Name or Email" class="form-control input-sm" id="srch" name="srch" @if(isset($srch)) value={{$srch}} @endif >
</div>
<button type="submit" class="btn" title="search" onclick="srchval()"><i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
<script >
function srchval(){
data=document.getElementById('srch').value;
if(!data){
alert("Search Fields are Empty!");
event.preventDefault();
return false;
}
let pattern = /[^0-9]/g;
let result = data.match(pattern);
if( data.match(pattern)==null)
{
alert("Only Name and Email are allowed!");
event.preventDefault();
return false;
}
return true;
}
</script>
</div>
{{-- srch fld ends --}}
<div class="table-responsive">
<table class="table table-borderless table-data3">
<thead>
<tr>
<th>Sr No.</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>Image</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php $c=1; ?>
@if(count($users)>0)
@foreach($users as $user)
<tr class="tr-shadow">
<td> {{$c++;}}</td>
<td> {{ $user->name}} </td>
<td> <span class="block-email">{{ $user->email}}</span> </td>
<td> <span class="status--process"> {{getRole( $user)}}</span> </td>
<td>
<img src="{{$user->image}}" alt="{{$user->name}} banner" height="60px" width="70px">
</td>
<td> @if($user->active)
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Inactive">
<i class="fa fa-eye"></i> Active
</button>
</form>
@else
<form action="{{route('acInacUserDri')}}" method="post">
@csrf
<input value="{{$user->id}}" type="hidden" name="user_id">
<button type="submit" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Click to Active">
<i class="fa fa-eye-slash"></i> Inactive
</button>
</form>
@endif
</td>
<td>
<div class="table-data-feature">
<form action="/user_role_edit" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Edit">
<i class="fa fa-edit text-dark"></i>
</button>
</form>
<form action="/user_role_delete" method="post" >
@csrf
<input type="hidden" name="user_id" value="{{$user->id}}">
<button class="item" data-toggle="tooltip" data-placement="left" title="Click to Delete">
<i class="fa fa-trash text-danger"></i>
</button>
</form>
</div>
</td>
</tr>
<tr class="spacer"></tr>
@endforeach
@else
<td colspan="7" class="text-center"> No Data Found</td>
@endif
</tbody>
</table>
</div>
<div class="text-right mx-5 my-2">
@if(isset($srch)) <a href="/user_roles"> <i class="fa fa-reply"></i> Back to all</a> @endif
</div>
<!-- END DATA TABLE -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="copyright">
<p>Copyright © 2022. All rights reserved. Template by <a href="https://colorlib.com">Mr</a>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="{{asset('admin/vendor/jquery-3.2.1.min.js')}}"></script>
<!-- Bootstrap JS-->
<script src="{{asset('admin/vendor/bootstrap-4.1/popper.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-4.1/bootstrap.min.js')}}"></script>
<!-- Vendor JS -->
<script src="{{asset('admin/vendor/slick/slick.min.js')}}">
</script>
<script src="{{asset('admin/vendor/wow/wow.min.js')}}"></script>
<script src="{{asset('admin/vendor/animsition/animsition.min.js')}}"></script>
<script src="{{asset('admin/vendor/bootstrap-progressbar/bootstrap-progressbar.min.js')}}">
</script>
<script src="{{asset('admin/vendor/counter-up/jquery.waypoints.min.js')}}"></script>
<script src="{{asset('admin/vendor/counter-up/jquery.counterup.min.js')}}">
</script>
<script src="{{asset('admin/vendor/circle-progress/circle-progress.min.js')}}"></script>
<script src="{{asset('admin/vendor/perfect-scrollbar/perfect-scrollbar.js')}}"></script>
<script src="{{asset('admin/vendor/chartjs/Chart.bundle.min.js')}}"></script>
<script src="{{asset('admin/vendor/select2/select2.min.js')}}">
</script>
<!-- Main JS-->
<script src="{{asset('admin/js/main.js')}}"></script>
</body>
</html>
<!-- end document-->
In public folder >> css >> JS and imgs are store.
In database >> migrations >> migrate some tables.
enquiries
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('enquiries', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('email')->nullable();
$table->string('subject')->nullable();
$table->longText('message')->nullable();
$table->integer('status')->default('0');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('enquiries');
}
};
roles
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function (Blueprint $table) {
$table->id();
$table->string('title')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('roles');
}
};
pages
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('pages', function (Blueprint $table) {
$table->id();
$table->string('page')->nullable();
$table->string('title')->nullable();
$table->string('image')->nullable();
$table->integer('active')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('pages');
}
};
drivers
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('drivers', function (Blueprint $table) {
$table->id();
// Name Email Phone Address LicenceNo CarNo Salary Active
$table->string('name')->nullable();
$table->string('email')->nullable();
$table->string('password')->nullable();
$table->bigInteger('phone')->nullable();
$table->string('address')->nullable();
$table->string('carNo')->nullable();
$table->string('licenceNo')->nullable();
$table->string('experience')->nullable();
$table->string('salary')->nullable();
$table->string('image')->nullable();
$table->string('role_id')->default('2');
$table->string('active')->default('1');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('drivers');
}
};
cars
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('cars', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('brand')->nullable();
$table->string('carNo')->nullable();
$table->string('person')->nullable();
$table->string('gear')->nullable();
$table->string('year')->nullable();
$table->string('kmpl')->nullable();
$table->string('runs')->nullable();
$table->integer('price')->nullable();
$table->string('image')->nullable();
$table->string('features')->nullable();
$table->string('desc')->nullable();
$table->string('status')->nullable();
$table->string('book')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('cars');
}
};
bookings
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('bookings', function (Blueprint $table) {
$table->id();
$table->integer('car_id')->nullable();
$table->integer('customer_id')->nullable();
$table->integer('driver_id')->nullable();
$table->string('avai_id')->nullable();
$table->bigInteger('mobile')->nullable();
$table->string('puloc')->nullable();
$table->string('drloc')->nullable();
$table->date('pudate')->nullable();
$table->string('putime')->nullable();
$table->string('personAd')->nullable();
$table->string('personCh')->nullable();
$table->string('message')->nullable();
$table->string('paymentMode')->nullable();
$table->string('total')->nullable();
$table->string('bookStatus')->default('0');
$table->string('status')->default('2');
// $table->string('')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('bookings');
}
};
availabilities
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('availabilities', function (Blueprint $table) {
$table->id();
$table->string('customer_id')->nullable();
$table->string('driver_id')->nullable();
$table->string('car_id')->nullable();
$table->string('puloc')->nullable();
$table->string('droploc')->nullable();
$table->date('pudate')->nullable();
$table->string('putime')->nullable();
$table->string('mail')->nullable();
$table->string('available')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('availabilities');
}
};
locations
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('locations', function (Blueprint $table) {
$table->id();
$table->string('area')->nullable();
$table->string('active')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('locations');
}
};
testimonials
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('testimonials', function (Blueprint $table) {
$table->id();
$table->string('book_id')->nullable();
$table->string('message')->nullable();
$table->string('rating')->nullable();
$table->string('status')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('testimonials');
}
};
In side Seeder
location
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class locationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
// DB::table('locations')->delete();
//
// DB::table('locations')->insert([
// [
// 'area' => 'Alipore',
// 'active' => '1',
// ],
// [
// 'area' => 'Park Street',
// 'active' => '1',
// ],
// [
// 'area' => 'Kasba',
// 'active' => '1',
// ],
// [
// 'area' => 'Science City',
// 'active' => '1',
// ],
// [
// 'area' => 'New Town',
// 'active' => '1',
// ],
// [
// 'area' => 'Eden Gardens',
// 'active' => '1',
// ],
// [
// 'area' => 'Town Hall',
// 'active' => '1',
// ],
// [
// 'area' => 'Sealdah',
// 'active' => '1',
// ],
// [
// 'area' => 'Phoolbagan',
// 'active' => '1',
// ],
// [
// 'area' => 'Howrah',
// 'active' => '1',
// ],
// [
// 'area' => 'Kalighat',
// 'active' => '1',
// ],
// [
// 'area' => 'Dakshineswar',
// 'active' => '1',
// ],
// [
// 'area' => 'Rajarhat',
// 'active' => '1',
// ],
// [
// 'area' => 'Karunamoyee',
// 'active' => '1',
// ]
// ]);
}
}
page
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class pageSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// DB::table('pages')->delete();
// //
// DB::table('pages')->insert([
// [
// 'page' => 'home',
// 'title' => 'HOME',
// 'active' => '1',
// ],
// [
// 'page' => 'about',
// 'title' => 'ABOUT',
// 'active' => '1',
// ],
// [
// 'page' => 'service',
// 'title' => 'SERVICE',
// 'active' => '1',
// ],
// [
// 'page' => 'carlist',
// 'title' => 'CAR LIST',
// 'active' => '1',
// ],
// [
// 'page' => 'cardetail',
// 'title' => 'CAR DETAIL',
// 'active' => '1',
// ],
// [
// 'page' => 'carbooking',
// 'title' => 'CAR BOOKING',
// 'active' => '1',
// ],
// [
// 'page' => 'theteam',
// 'title' => 'THE TEAM',
// 'active' => '1',
// ],
// [
// 'page' => 'testimonial',
// 'title' => 'TESTIMONIAL',
// 'active' => '1',
// ],
// [
// 'page' => 'contact',
// 'title' => 'CONTACT',
// 'active' => '1',
// ]
// ]);
}
}
role
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class RoleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
// DB::table('roles')->delete();
// //
// DB::table('roles')->insert([
// [
// 'title' => 'admin',
// ],
// [
// 'title' => 'driver',
// ],
// [
// 'title' => 'customer',
// ]
// ]);
}
}
Inside app >> helpers.php file
<?php
function test(){
return "Laravel";
}
function userRole(){
$id= session()->get('user_id');
$data= DB::table('users')->where('id',$id)->first();
return $data->role_id;
}
function isDriverLogin(){
$id= session()->get('driver_id');
$data= DB::table('drivers')->where('id',$id)->first();
// dd($data);
if($data)
return true;
else
return false;
}
function getRole($usr){
$roles = DB::table('roles')->get();
foreach($roles as $role){
if($role->id == $usr->role_id)
{
return $role->title;
}
}
return "no roles";
}
function findCust($customer_id){
$cust = DB::table('users')->where('id',$customer_id)->first();
return $cust->name;
}
// $car = car::all();
// $driver = driver::all(); findDri($item->driver_id)
function findDri($driver_id){
$user = DB::table('drivers')->get();
foreach($user as $pr){
if($pr->id == $driver_id){
return $pr->name;
}
}
}
function findCar($car_id){
$car = DB::table('cars')->get();
foreach($car as $pr){
if($pr->id == $car_id){
return $pr->brand.' '.$pr->name;
}
}
}
function findLoc($loc){
$locas = DB::table('locations')->get();
foreach($locas as $pr){
if($pr->id == $loc){
return $pr->area;
}
}
}
// Booking table status 2= no response 1= confirm 0= failed
// available table available null= no response 1= confirm 0=failed
function isDriverLoc($Did, $puid, $dpid){
if( ($Did=='1') && ($puid =='1' || $puid =='2' || $puid =='3' || $puid =='4' || $puid =='5') && ($dpid =='1' || $dpid =='2' || $dpid =='3' || $dpid =='4' || $dpid =='5') )
{ return true; }
elseif( ($Did=='7') && ($puid =='8' || $puid =='7' || $puid =='6' || $puid =='9' || $puid =='10' ) && ($dpid =='6' || $dpid =='7' || $dpid =='8' || $dpid =='9' || $dpid =='10') ){
return true;
}
elseif( ($Did=='8') && ($puid =='15' || $puid =='14' || $puid =='13' || $puid =='12' || $puid =='11' || $puid =='8' || $puid =='7' || $puid =='6' || $puid =='9' || $puid =='10' ) && ( $dpid =='6' || $dpid =='7' || $dpid =='8' || $dpid =='9' || $dpid =='10' || $dpid =='11' || $dpid =='12' || $dpid =='13' || $dpid =='14' || $dpid =='15') ){
return true;
}
return false;
}
function DriverLocas($Did){
if($Did=='1')
{
$locDriwise = findLoc('1').' '.findLoc('2').' '.findLoc('3').' '.findLoc('4').' '.findLoc('5');
return $locDriwise;
}
elseif($Did=='7')
{
$locDriwise = findLoc('6').' '. findLoc('7').' '.findLoc('8').' '.findLoc('9').' '.findLoc('10');
return $locDriwise;
}
elseif($Did=='8')
{
$locDriwise = findLoc('6').' '. findLoc('7').' '.findLoc('8').' '.findLoc('9').' '.findLoc('10').' '. findLoc('11').' '.findLoc('12').' '.findLoc('13').' '.findLoc('14').' '.findLoc('15');
return $locDriwise;
}
return false;
}
# code...
function driver_details($type, $id)
{
$driverData = DB::table('drivers')->get();
foreach($driverData as $dr){
if($dr->id==$id){
if($type == 'experience'){
return $dr->experience;
}
if($type == 'image'){
return $dr->image;
}
if($type=='request'){
return DB::table('availabilities')->where('driver_id',$id)->count();
}
if($type=='phone'){
return $dr->phone;
}
if($type=='workingDay'){
return DB::table('bookings')->where('driver_id',$id)->distinct('pudate')->count('pudate');
}
if($type=='customer'){
return DB::table('bookings')->where('driver_id',$id)->distinct('customer_id')->count('customer_id');
}
if($type=='income'){
$data= DB::table('bookings')->select(DB::raw('sum(total) as income'))
->where('driver_id',$id)->first();
return $data->income;
}
}
}
// type==experience, type==carNo
}
function findCustomer($id){
$data = DB::table('bookings')->where('id',$id)->first();
$customer_name = DB::table('users')->where('id',$data->customer_id)->first();
// dd($customer_name);
return $customer_name->name;
}
function feedbackDone($id){
$data = DB::table('testimonials')->where('book_id',$id)->first();
if($data){
return "Feedback Done. Thank You.";
}else{
return "Please give your Feedback.";
}
}
function ratingAvg($driver_id){
$bkDrDatas = DB::table('bookings')->where('driver_id',$driver_id)->get();
$ctn=0;
$noOftest = 0;
foreach($bkDrDatas as $data){
$data2 = DB::table('testimonials')->where('book_id',$data->id)->first();
if(isset($data2)) {
$ctn = $ctn + (int)$data2->rating ;
$noOftest = $noOftest + 1;
}
}
if($noOftest==0){
return ceil(1);
}else{
return ceil($ctn/$noOftest);
}
}
?>
Models are
admin
availability
booking
car
driver
enquiry
location
pages
role
testimonial
user
In app> mail folder
adminMail.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class adminMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($adminMail)
{
//
$this->adminMail = $adminMail;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
// return $this->view('view.name');
return $this->view('admin.mail')->with('adminMail',$this->adminMail);
}
}
AdminReply.blade.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class AdminReply extends Mailable
{
use Queueable, SerializesModels;
public function __construct($adminReply)
{
//
$this->adminReply = $adminReply;
}
public function build()
{
return $this->view('admin.mailreply')->with('AdminReply',$this->adminReply);
// return $this->view('view.name');
}
}
clMail.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class clMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct($data)
{
$this->data = $data;
}
public function build()
{
return $this->view('mailsend')->with('data', $this->data);
}
}
FeedbackMail.blade.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class FeedbackMail extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($id)
{
//
$this->id = $id;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->view('customer.fdmail')->with('data',$this->id);
}
}
Add middleware to App/Kernal.php
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'adlgchk'=>[
\App\Http\Middleware\adlgchk::class,
],
'isAdmin' => [
\App\Http\Middleware\isAdmin::class
],
'Driver' => [
\App\Http\Middleware\Driver::class
],
'Customer' => [
\App\Http\Middleware\Customer::class
],
'OnlyAccess' => [
\App\Http\Middleware\OnlyAccess::class
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array<string, class-string|string>
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'disable_back_btn' => \App\Http\Middleware\DisableBackBtn::class,
];
}
IN app/http/middleware
adlgchk.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Session;
class adlgchk
{
public function handle(Request $request, Closure $next)
{
if(!session()->has('adeu')){
return redirect('adlogin');
}
return $next($request);
}
}
customer.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class Customer
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
if(Auth::check()){
// dd(auth()->user()->role_id);
if(auth()->user()->role_id == 3){
return $next($request);
}
}
Auth::logout();
return redirect('adlogin');
}
}
DisableBackBtn.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class DisableBackBtn
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
$response= $next($request);
$response->headers->set('Cache-Control', 'nocache, no-store, max-age=0, must-revalidate');
$response->headers->set('Pragma','no-cache');
$response->headers->set('Expires','Sat, 01 Jan 2000 00:00:00 GMT');
return $response;
}
}
Driver.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Session;
class Driver
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
if(session()->has('driver_id')){
return $next($request);
}
return redirect('driver');
}
}
isAdmin.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class isAdmin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
// dd(Auth::user()->role_id);
// dd(Auth::check());
if(Auth::check()){
if(Auth()->user()->role_id == 1){
return $next($request);
}
}
Auth::logout();
return redirect('adlogin');
}
}
OnlyAccess.blade.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class OnlyAccess
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
*/
public function handle(Request $request, Closure $next)
{
if(Auth::check()){
return $next($request);
}
Auth::logout();
return redirect('adlogin');
}
}
Inside App\Http\Controllers
adminController.blade.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\user;
use App\Models\pages;
use App\Models\Role;
use App\Models\enquiry;
use App\Models\car;
use App\Models\driver;
use App\Models\availability;
use App\Models\booking;
use App\Models\testimonial;
use Hash;
use Session;
use DB;
use App\Mail\adminMail;
use Illuminate\Support\Facades\Mail;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
class AdminController extends Controller
{
function register() {
return view('admin.register');
}
function forget_pass() {
return view('admin.forget_pass');
}
function login() {
return view('admin.login');
}
function index() {
if (Auth::check()) { // The user is logged in...
$driverCnt =driver::where('active','1')->count();
$carCnt = car::where('status','1')->count();
$bkngCnt = booking::where('status','1')->count();
// dd($bkngCnt);
$tInc = booking::where('status','1')->get();
$total=0;
foreach($tInc as $row){
$total = $total + $row->total;
}
// dd($total);
$data['driverCnt'] = $driverCnt;
$data['carCnt'] = $carCnt;
$data['bkngCnt'] = $bkngCnt;
$data['total'] =$total;
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.index',['adeu' => $adfn,'data'=>$data]);
}
return redirect()->back();
} //ok
function adfrinac(Request $r){
$r->validate([
'name' => 'required',
'email' => 'required |unique:users',
'password' => 'required',
// 'role' => 'required',
'adimg' => 'image|mimes:jpg,jpeg,png,ico,bmp'
]);
if($r->hasFile('adimg')) {
$file_type = $r->file('adimg')->extension();
$file_path = $r->file('adimg')->storeAs('admin/images/pf', time() . '.' . $file_type, 'public');
$r->file('adimg')->move(public_path('admin/images/pf'), time() . '.' . $file_type);
}
$nwad = new user;
$nwad->name = $r->name;
$nwad->email = $r->email;
$nwad->password = Hash::make($r->password);
// $nwad->role = $r->role;
$nwad->image=$file_path;
$nwad->save();
// Session::flash('message', "Records are Added Successfully");
return redirect('adlogin');
}//okok
// admin login
function adlgac(Request $r){
// email
$user = user::where('email',$r->email)->first();
$adcnt = user::where('email',$r->email)->count();
if($adcnt > 0){
if($user->active == 1){
if(Hash::check($r->password, $user->password )){
$r->session()->put('adeu',$user);
$r->session()->put('user_id',$user->id);
Auth::login($user);
return redirect('adindex')->with('message',' Login Successfully. ');
}else{
return redirect()->back()->with('wrlgcr','** Username or Password does not match');
}
}else{
return redirect()->back()->with('wrlgcr',' You are blocked for a limited period of time.');
}
}else{
return redirect()->back()->with('wrlgcr','** Username or Password does not match');
}
}//okok
// mail box blade view page
function mailbox(){
$data = enquiry::paginate(5);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.mailbox',['data'=>$data,'adeu' => $adfn]);
}
// admin mail sending // admin reply mail post
function admailsend(Request $req){
$enrr = enquiry::find($req->sid);
$adminmail=[
'name'=> $enrr->name,
'email'=> $enrr->email,
'subject'=> $req->subject,
'message'=> $req->rply,
];
Mail::to($enrr->email)->send(new adminMail($adminmail));
DB::table('enquiries')->where('id',$req->sid)->update(['status' => '1']);
return view('admin.mailreply',['AdminReply'=>$adminmail]);
}
// admin reply data fetch
public function mail_rply($id)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$enrr = enquiry::find($id);
return view('admin.reply_mail',['adeu' => $adfn, 'enrr' => $enrr]);
}
// admin account data fetch
function adacc(){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data2 = role::select("*")->whereIn('id', explode(', ', $adfn->role_id))->get();
return view('admin.adaccount',['adeu' => $adfn, 'data2'=>$data2]);
}
// admin account update
public function adupac(Request $req)
{
$req->validate([
'name' => 'required',
'email' => 'required|email|unique:users,email,'.$req->adid,
'adimg' => 'image|mimes:jpg,jpeg,png,ico,bmp'
]);
if ($req->hasFile('adimg')) {
if($req->old_img != '' )
unlink($req->old_img);
$file_type = $req->file('adimg')->extension();
$file_path = $req->file('adimg')->storeAs('admin/images/pf', time() . '.' . $file_type, 'public');
$req->file('adimg')->move(public_path('admin/images/pf'), time() . '.' . $file_type);
}else{
$file_path=$req->old_img;
}
$adur = DB::table('users')
->where('id', $req->adid)
->update([
'name' => $req->name,
'email' => $req->email,
'image' => $file_path,
]);
Session::flash('message', "Records Updated Successfully");
return redirect('adindex');
}
// admin change password view page
function adchpas(){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.chnps',['adeu' => $adfn]);
}
// admin password update action
function adpassupdate(Request $req){
$adfn = user::where('email',$req->ademail)->first();
$adcnt = user::where('email',$req->ademail)->count();
if($adcnt > 0){
if(Hash::check($req->op, $adfn->password )){
if($req->op != $req->np){
if($req->np == $req->cp){
$adur = DB::table('users')
->where('id', $req->adid)
->update([
'password' => Hash::make($req->np),
]);
Session::flash('message', "Password Updated Successfully");
return redirect('adindex');
}else{
return redirect()->back()->with('wrlgcr','** New Password and Confirm Password does not match');
}
}else{
return redirect()->back()->with('wrlgcr','** Old Password and New Password are Same, Need to be changed.');
}
}else{
return redirect()->back()->with('wrlgcr','** Old Password and Database Password does not match');
}
}else{
return redirect()->back()->with('wrlgcr','** Invalid User');
}
}
// banner page view list page
function pagebannertitlechangeview(){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$pages = pages::all();
// return $pages;
return view('admin.changer',['adeu' => $adfn, 'pages'=>$pages]);
}
// banner page active inactive post method
function acinacfmac(Request $req){
$pg = pages::where('id',$req->id)->first();
if($pg->active == 1)
$c=0;
else
$c=1;
$pg = DB::table('pages')
->where('id', $req->id)
->update(['active' =>$c ]);
return redirect('chnger')->with('status','Page status changed');
}
// banner edit page view data fetch
function pggedit(Request $req){
$pg = pages::where('id',$req->pggid)->first();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.editpage',['pg'=>$pg,'adeu' => $adfn]);
}
// page edit post
public function editpggac(Request $req)
{
$insert=array();
if($req->hasfile('images')) {
if($req->pgimz!=null){
$img = explode(', ', $req->pgimz);
foreach($img as $image){
unlink($image);
}
}
foreach($req->file('images') as $key => $file)
{
$rnff = rand(0, 99999);
$file_type = $file->extension();
$file_path = $file->storeAs('admin/images/bg', $rnff . time() . '.' . $file_type, 'public');
$file->move(public_path('admin/images/bg'), $rnff . time(). '.' . $file_type);
array_push($insert,$file_path);
}
$insert= implode(", ",$insert);
}else{
$insert = $req->pgimz; }
$data = DB::table('pages')->where('id',$req->adid)->update(['active' => $req->pgact, 'page' => $req->pgpage, 'title' => $req->pgtitle, 'image' => $insert ]);
return redirect('chnger')->with('status','Successfully Updated Page Data');
}
// date wise mail search
public function mailsrch(Request $req)
{
$start_date = Carbon::parse($req->start_date)->toDateTimeString();
$end_date = Carbon::parse($req->end_date)->toDateTimeString();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = enquiry::whereBetween('created_at', [$start_date, $end_date])->paginate(5);
return view('admin.mailbox',['data'=>$data,'adeu' => $adfn, 'req'=>$req]);
}
// page add view fetch method
public function pgadds()
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.addpage',['adeu' => $adfn]);
}
// page delete
public function pgdeletes($pid)
{
$pg = pages::find($pid);
$pd = DB::table('pages')->where('id', $pid)->delete();
return redirect('chnger')->with('status','Successfully Deleted '. $pg->page.' Page Data');
}
// page add action post
public function addpggac(Request $req)
{
$req->validate([
'page' => 'required|unique:pages',
'title' => 'required',
'pgact' => 'required',
]);
$insert=array();
if($req->hasfile('images'))
{
foreach($req->file('images') as $key => $file)
{
$rnff = rand(0, 99999);
$file_type = $file->extension();
$file_path = $file->storeAs('admin/images/bg', $rnff . time() . '.' . $file_type, 'public');
$file->move(public_path('admin/images/bg'), $rnff . time(). '.' . $file_type);
array_push($insert,$file_path);
}
$insert= implode(", ",$insert);
}
$data = DB::table('pages')->insert(['active' => $req->pgact, 'page' => $req->page, 'title' => $req->title, 'image' => $insert ]);
return redirect('chnger')->with('status','Successfully Created Page Data');
}
// USER ROLE
public function user_roles() {
$users = user::all();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.user_roles',['adeu' => $adfn, 'users'=> $users]);
}
// DRIVER ROLE
public function driverList()
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first(); //sidebar data
$drivers = driver::all(); //driver data
return view('admin.driver_roles',['adeu' => $adfn, 'drivers'=>$drivers]);
}
// USER ROLE EDIT
public function user_role_edit(Request $req)
{
// dd($req->driver_id);
if(isset($req->user_id)){
$usr = user::find($req->user_id);
$isUser= true;
}elseif(isset($req->driver_id)){
$usr = driver::find($req->driver_id);
$isUser = false;
}
$data2 = role::select("*")->whereIn('id', explode(', ', $usr->role_id))->get();
// dd($usr);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.user_edit_roles',['adeu' => $adfn, 'user'=> $usr , 'isUser'=>$isUser, 'data2' =>$data2]);
}
// user role edit fun
public function edit_ac_user_role(Request $req)
{
if($req->isUser){
$usr = user::find($req->user_id);
if ($req->hasFile('image')) {
if($req->pgimz != '' )
unlink($req->pgimz);
//echo "";
$file_type = $req->file('image')->extension();
$file_path = $req->file('image')->storeAs('admin/images/pf', time() . '.' . $file_type, 'public');
$req->file('image')->move(public_path('admin/images/pf'), time() . '.' . $file_type);
}else{
$file_path=$req->pgimz;
}
DB::table('users')->where('id',$req->adid)->update(['name' => $req->name, 'email' => $req->email, 'image' => $file_path ]);
return redirect('user_roles')->with('status','Successfully Updated User');
}else{
$eu = driver::find($req->driver_id);
if ($req->hasFile('image')) {
if($req->pgimz != '' )
unlink($req->pgimz);
//echo "";
$file_type = $req->file('image')->extension();
$file_path = $req->file('image')->storeAs('admin/images/driver', time() . '.' . $file_type, 'public');
$req->file('image')->move(public_path('admin/images/driver'), time() . '.' . $file_type);
}else{
$file_path=$req->pgimz; }
DB::table('drivers')->where('id',$req->adid)->update(['name' => $req->name, 'email' => $req->email, 'image' => $file_path ]);
return redirect('driverList')->with('status','Successfully Updated User');
}
}
// add new user
public function add_user_role()
{
$rolesall = role::all();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.add_user_role',['adeu' => $adfn, 'eduall' => $rolesall]);
}
public function add_ac_user_role(Request $req){
#name, email, roles, image
$req->validate([
'name' => 'required',
'email' => 'required|unique:users',
'roles' => 'required',
'password' => 'required',
'image' => 'image|mimes:jpg,jpeg,png,ico,bmp'
]);
$file_type = $req->file('image')->extension();
$file_path = $req->file('image')->storeAs('admin/images/pf', time() . '.' . $file_type, 'public');
$req->file('image')->move(public_path('admin/images/pf'), time() . '.' . $file_type);
$password = Hash::make($req->password);
if($req->roles == 2){
// dd($extract);
DB::table('drivers')->insert([
'name' => $req->name,
'email' => $req->email,
'password' => Hash::make($req->password),
'image' => $file_path,
'role_id' => $req->roles,
'salary' => '18000',
]);
Session::flash('status', "Successfully Updated Driver.");
return redirect('driverList');
}else{
$data = DB::table('users')->insert(['name' => $req->name, 'email' => $req->email, 'password' => $password, 'role_id' => $req->roles, 'image' => $file_path ]);
}
return redirect('user_roles')->with('status',' Successfully Updated User.');
}
// Delete users
public function user_role_delete(Request $req)
{
// dd($req->user_id);
if(isset($req->user_id)){
$data = DB::table('users')->where('id',$req->user_id)->get();
$role = $data[0]->role_id;
$users = User::select("*")->whereIn('role_id', [1])->get();
if($role == 1 && count($users) == 1)
{
return redirect('user_roles')->with('error',' Admin Cannot be Deleted.');
}else if($role == 1 && count($users) > 1 && session()->get('adeu')['id'] == $id){
// more than one admin
DB::table('users')->where('id',$req->user_id)->delete();
Session::forget('adeu');
return redirect('adlogin');
}
// else customer
DB::table('users')->where('id',$req->user_id)->delete();
}elseif(isset($req->driver_id)){
DB::table('drivers')->where('id',$req->driver_id)->delete();
return redirect('driverList')->with('status','Successfully Updated User');
}
return redirect('user_roles')->with('status',' Successfully Deleted User');
}
// User Driver active inactive function
public function acInacUserDri(Request $req)
{
$c=0;
if(isset($req->user_id)){
$user = user::where('id',$req->user_id)->first();
if($user->active == 1)
$c=0;
else
$c=1;
$pg = DB::table('users')
->where('id', $req->user_id)
->update(['active' =>$c ]);
if($c==0) //inactive
{
return redirect('user_roles')->with('status',' Successfully Deactivated User.');
}else
{
return redirect('user_roles')->with('status',' Successfully Activated User.');
}
}elseif(isset($req->driver_id)){
$driver = Driver::where('id',$req->driver_id)->first();
if($driver->active == 1)
$c=0;
else
$c=1;
$pg = DB::table('drivers')
->where('id', $req->driver_id)
->update(['active' =>$c ]);
if($c==0) //inactive
{
return redirect('driverList')->with('status',' Successfully Deactivated Driver.');
}else
{
return redirect('driverList')->with('status',' Successfully Activated Driver.');
}
}
}
// customer user search field
public function user_srch(Request $req){
if(isset($req->srch)){
$data = DB::table('users')->where('email','LIKE','%'.$req->srch.'%' )->orWhere('name','LIKE', '%'.$req->srch.'%')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.user_roles',['adeu' => $adfn, 'users'=>$data, 'srch'=>$req->srch]);
}else if(isset($req->driver_srch)) {
$data = DB::table('drivers')->where('email','LIKE','%'.$req->driver_srch.'%' )->orWhere('name','LIKE', '%'.$req->driver_srch.'%')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.driver_roles',['adeu' => $adfn, 'drivers'=>$data, 'srch'=>$req->driver_srch]);
}
}
// CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS
// CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS
// CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS
// CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS
// Fetching Car data
public function carList()
{
$cars = car::all();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.carList',['adeu' => $adfn, 'cars' => $cars]);
}
# add car blade file
public function addCars()
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.carAdding',['adeu' => $adfn]);
}
#adding car post method
public function car_added(Request $req)
{
$req->validate([
'name' => 'required',
'brand' => 'required',
'carNo' => 'required',
'person' => 'required',
'gear' => 'required',
'year' => 'required',
'kmpl' => 'required',
'features' => 'required',
'status' => 'required',
'runs' => 'required' ,
'price' => 'required',
'images' => 'required'
]);
// array of images
$insert=array();
if($req->hasfile('images'))
{
foreach($req->file('images') as $key => $file)
{
$rnff = rand(0, 99999);
$file_type = $file->extension();
$file_path = $file->storeAs('admin/images/cars', $rnff . time() . '.' . $file_type, 'public');
$file->move(public_path('admin/images/cars'), $rnff . time(). '.' . $file_type);
array_push($insert,$file_path);
}
$insert= implode(", ",$insert);
}else{
$insert = $req->pgimz;
}
$car = new car;
$car->name = $req->name;
$car->brand = $req->brand;
$car->carNo = $req->carNo;
$car->person = $req->person;
$car->gear = $req->gear;
$car->year = $req->year;
$car->kmpl = $req->kmpl;
$car->status = $req->status;
$car->features = $req->features;
$car->desc = $req->desc;
$car->price = $req->price;
$car->runs = $req->runs;
$car->image= $insert;
$car->book= '0';
$car->save();
Session::flash('message', "Car Added Successfully");
return redirect('carList');
}
// car edit page view with value
public function car_edit(Request $req)
{
$car = car::find($req->car_id);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
// return view('admin.carAdding',['adeu' => $adfn]);
return view('admin.car_edit',['adeu' => $adfn, 'car'=>$car]);
}
// car_edit_action
public function car_edit_ac(Request $req)
{
$req->validate([
'name' => 'required',
'brand' => 'required',
'carNo' => 'required',
'person' => 'required',
'gear' => 'required',
'year' => 'required',
'kmpl' => 'required',
'features' => 'required',
'status' => 'required',
'runs' => 'required' ,
'price' => 'required',
]);
// array of images
$insert=array();
if($req->hasfile('images'))
{
if($req->pgimz != '' )
unlink($req->pgimz);
foreach($req->file('images') as $key => $file)
{
$rnff = rand(0, 99999);
$file_type = $file->extension();
$file_path = $file->storeAs('admin/images/cars', $rnff . time() . '.' . $file_type, 'public');
$file->move(public_path('admin/images/cars'), $rnff . time(). '.' . $file_type);
array_push($insert,$file_path);
}
$insert= implode(", ",$insert);
}else{
$insert = $req->pgimz;
}
$car = car::find($req->car_id);
$car->name = $req->name;
$car->brand = $req->brand;
$car->carNo = $req->carNo;
$car->person = $req->person;
$car->gear = $req->gear;
$car->year = $req->year;
$car->kmpl = $req->kmpl;
$car->status = $req->status;
$car->features = $req->features;
$car->desc = $req->desc;
$car->price = $req->price;
$car->runs = $req->runs;
$car->image= $insert;
$car->save();
Session::flash('status', $car->name." Car Updated Successfully");
return redirect('carList');
}
// Car Delete action
public function carDelete($id)
{
$car = DB::table('cars')->where('id',$id)->first();
if($car->image != '' ){
$img = explode(', ', $car->image);
foreach($img as $image){
unlink($image);
}
}
DB::table('cars')->where('id',$id)->delete();
return redirect('carList')->with('status',' Car Deleted Successfully. ');
}
public function acInacCars(Request $req)
{
$c=0;
if(isset($req->car_id)){
$car = car::where('id',$req->car_id)->first();
if($car->status == 1)
$c=0;
else
$c=1;
$pg = DB::table('cars')
->where('id', $req->car_id)
->update(['status' =>$c ]);
}
if($c==0) //inactive
{
return redirect('carList')->with('status',' Successfully Deactivated Car.');
}else
{
return redirect('carList')->with('status',' Successfully Activated Car.');
}
}
// Admin Show all available request list
public function readRequest()
{
$data = availability::paginate(5);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data]);
}
// search field on Admin Show all available request list
// get method act as post
// Joining multiple table and check using where clause
public function RequestSrch(Request $req){
$srch= $req->input('srch');
if(strtoupper($srch) == 'NO MAILS') {
$data = availability::where('mail','0')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data , 'srchbck'=>$srch]);
}else if(strtoupper($srch) == 'MAIL SENT'){
$data = availability::where('mail','1')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'NO RESPONSE'){
$data = availability::where('available',null)->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'REJECTED'){
$data = availability::where('available','0')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
else if( strtoupper($srch) == 'AVAILABLE'){
$data = availability::where('available','1')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
$data= availability::join('drivers','drivers.id', '=', 'availabilities.driver_id')
->join('cars', 'cars.id', '=', 'availabilities.car_id')
->join('locations', 'locations.id', '=', 'availabilities.puloc')
->join('locations as l2', 'l2.id', '=', 'availabilities.droploc')
->join('users', 'users.id', '=', 'availabilities.customer_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->orWhere('cars.name', 'LIKE','%'.$srch.'%')
->orWhere('cars.brand', 'LIKE','%'.$srch.'%')
->orWhere('locations.area', 'LIKE','%'.$srch.'%')
->orWhere('availabilities.pudate', 'LIKE','%'.$srch.'%')
->orWhere('availabilities.putime', 'LIKE','%'.$srch.'%')
->orWhere('users.name', 'LIKE','%'.$srch.'%')
->orWhere('l2.area', 'LIKE','%'.$srch.'%')
->get();
// dd( $data);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.readRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
// date wise availability search
public function avai_date_srch(Request $req)
{
$start_date = Carbon::parse($req->start_date)->toDateTimeString();
$end_date = Carbon::parse($req->end_date)->toDateTimeString();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::whereBetween('pudate', [$start_date, $end_date])->get();
return view('admin.readRequest',['data'=>$data,'adeu' => $adfn, 'req'=>$req]);
}
// Booking page view fun
public function bookingList()
{
// dd('admin booking page');
$data = booking::paginate(5);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.bookings',['adeu' => $adfn, 'data'=>$data]);
}
// All views Driver & Customer
public function allDr_Cu()
{
$customers = user::where('role_id',3)->get();
$drivers = driver::all();
// dd($customers);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.allDr_Cu',['adeu' => $adfn, 'users'=>$customers, 'drivers'=>$drivers]);
}
public function userSel($data)
{
if($data == 'customer')
{
$customers = user::where('role_id',3)->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.allDr_Cu',['adeu' => $adfn, 'users'=>$customers, 'srch'=>$data ]);
}
elseif($data == 'driver'){
$drivers = driver::all();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.allDr_Cu',['adeu' => $adfn, 'drivers'=>$drivers, 'srch'=>$data]);
}
return redirect()->back() ;
}
// JQUERY IMPLEMENT IN ALL DATA SELECT WISE
// public function allDr_CuJQ($type)
// {
// // dd($type);
// if($type == 'customer'){
// $customers = user::where('role_id',3)->get();
// $drivers=null;
// }elseif ($type == 'driver'){
// $drivers = driver::all();
// $customers=null;
// }else{
// $customers = user::where('role_id',3)->get();
// $drivers = driver::all();
// }
// // dd($customers);
// $adfn = user::where('email',session()->get('adeu')['email'] )->first();
// return view('admin.allDr_Cu',['adeu' => $adfn, 'users'=>$customers, 'drivers'=>$drivers]);
// }
// booking table admin blade search function
public function BookingSrch(Request $req)
{
$srch= $req->input('srch');
if( strtoupper($srch) == 'NO RESPONSE'){
$data = booking::where('status','2')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.bookings',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'BOOKING CANCLE'){
$data = booking::where('status','0')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.bookings',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
else if( strtoupper($srch) == 'BOOKING CONFIRM'){
$data = booking::where('status','1')->get();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.bookings',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
$data= booking::join('drivers','drivers.id', '=', 'bookings.driver_id')
->join('cars', 'cars.id', '=', 'bookings.car_id')
->join('locations', 'locations.id', '=', 'bookings.puloc')
->join('locations as l2', 'l2.id', '=', 'bookings.drloc')
->join('users', 'users.id', '=', 'bookings.customer_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->orWhere('cars.name', 'LIKE','%'.$srch.'%')
->orWhere('cars.brand', 'LIKE','%'.$srch.'%')
->orWhere('locations.area', 'LIKE','%'.$srch.'%')
->orWhere('bookings.pudate', 'LIKE','%'.$srch.'%')
->orWhere('bookings.putime', 'LIKE','%'.$srch.'%')
->orWhere('bookings.mobile', 'LIKE','%'.$srch.'%')
->orWhere('users.name', 'LIKE','%'.$srch.'%')
->orWhere('l2.area', 'LIKE','%'.$srch.'%')
->select('*','bookings.status as bkkStatus')
->get();
// dd( $data);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.bookings',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
// date wise booking search
public function bkk_date_srch(Request $req)
{
$start_date = Carbon::parse($req->start_date)->toDateTimeString();
$end_date = Carbon::parse($req->end_date)->toDateTimeString();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::whereBetween('pudate', [$start_date, $end_date])->get();
return view('admin.bookings',['data'=>$data,'adeu' => $adfn, 'req'=>$req]);
}
# admin show specific booking details
public function adShowTrip($id)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::where('id', $id)->first();
$driverData = driver::where('id',$data->driver_id)->first();
return view('admin.adShowTrip',['item'=>$data,'adeu' => $adfn, 'driverData'=>$driverData]);
}
# admin show driver earnings blade view file..
public function drEarnings()
{
$driver_info = DB::table('bookings')
->select('driver_id', DB::raw('count(*) as total'), DB::raw('sum(total) as income'))
->groupBy('driver_id')
->get();
$bookings = DB::table('bookings')->get();
// dd($bookings);
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.drEarnings',['driver_info'=>$driver_info, 'adeu' => $adfn, 'data'=>$bookings]);
}
# admin show all testimonials
public function showTesti()
{
$testis = testimonial::all();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
return view('admin.testimonials',['testis'=>$testis, 'adeu' => $adfn]);
}
# testimonial active Inactive function
public function testiAcIn(Request $req)
{
$data = testimonial::where('id',$req->t_id)->first();
if($req->type=='active'){
$data2 = testimonial::where('id',$req->t_id)->update(['status'=>'1']);
}elseif($req->type=='inactive'){
$data2 = DB::table('testimonials')->where('id',$req->t_id)->update(['status'=>'0']);
}
// dd($data,$req->t_id,$data2);
return redirect()->back()->with('status',' Successfully Updated Testimonial.'); ;
}
# testimonial edit function
public function delTestimonial($id)
{
DB::table('testimonials')->where('id',$id)->delete();
return redirect()->back()->with('status',' Successfully Deleted Testimonial.'); ;
}
# driver name wise search
public function bkkSrch(Request $req)
{
$srch= $req->input('srch');
$mnth = $req->input('month');
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
if(isset($mnth)){
$data= booking::join('drivers','drivers.id', '=', 'bookings.driver_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->whereMonth(
'pudate',
Carbon::createFromFormat('m', $req->month)
)->get();
return view('admin.drEarnings',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch, 'srMnth'=>$mnth]);
}else{
$data= booking::join('drivers','drivers.id', '=', 'bookings.driver_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->get();
return view('admin.drEarnings',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
}
# Datewise search
public function earning_date_srch(Request $req)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
if(isset($req->srch)){
$dataFetch = booking::join('drivers','drivers.id', '=', 'bookings.driver_id')
->where('drivers.name','LIKE', '%'.$req->srch.'%')
->whereMonth(
'pudate',
Carbon::createFromFormat('m', $req->month)
)->get();
return view('admin.drEarnings',['adeu' => $adfn, 'data'=>$dataFetch,'srMnth'=>$req->month, 'srchbck'=>$req->srch]);
}else{
$dataFetch = booking::whereMonth(
'pudate',
Carbon::createFromFormat('m', $req->month)
)->get();
return view('admin.drEarnings',['adeu' => $adfn, 'data'=>$dataFetch,'srMnth'=>$req->month]);
}
// $data11=DB::table('carbookingmodels')->where('pickupdate','like',$req->searchd.'/%')->get();
}
// export excel file of Sales Report
public function excelExport(Request $req)
{
$fileName = "members-data_" . date('Y-m-d') . ".xls";
$fields = array('Sr No.', 'Driver Name', 'Customer Name', ' Pickup Date', 'Payment Mode', 'Income', 'Status');
$excelData = implode("\t", array_values($fields)) . "\n";
$query = DB::table('bookings')->get();
$arrexplode = json_decode($req->data);
$c=1;
foreach($arrexplode as $row){
if($row->bookStatus=='4'){
$status = 'Complete';
}elseif($row->bookStatus=='0'){
$status = 'Canceled';
}elseif($row->bookStatus=='5'){
$status = 'Payment Due';
}elseif($row->bookStatus=='3' || $row->bookStatus=='2' ){
$status = 'Ongoing Process';
}else{
$status = 'No Response';
}
$lineData = array($c++, findDri($row->driver_id), findCust($row->customer_id), $row->pudate, $row->paymentMode, '$ '.$row->total.'.00' , $status );
$excelData .= implode("\t", array_values($lineData)) . "\n";
}
// Headers for download
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=\"$fileName\"");
// Render excel data
echo $excelData;
}
}
CarController.blade.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Notification;
use Carbon\Carbon;
use DB;
use App\Notifications\SendEmailNotification;
use Illuminate\Support\Facades\Mail;
use App\Mail\clMail;
use App\Mail\adminMail;
use App\Models\booking;
use App\Models\enquiry;
use App\Models\driver;
use App\Models\pages;
use App\Models\Car;
use App\Models\user;
use App\Models\Role;
use App\Models\availability;
use App\Models\location;
use Hash;
use Session;
use Illuminate\Support\Facades\Auth;
class CarController extends Controller
{
public function index(){
$page=pages::where('page','=','home')->first();
$cars = car::all()->take(6);
$drivers = driver::all();
$locations = DB::table('locations')->get();
$testimonials = DB::table('testimonials')->get();
return view('index',['page'=>$page, 'drivers' => $drivers, 'cars' => $cars, 'locations'=>$locations, 'testimonials'=>$testimonials]);
}
public function about(){
$page=pages::where('page','=','about')->first();
$cars = car::all();
$drivers = driver::all();
$locations = DB::table('locations')->get();
return view('about',['page'=>$page, 'drivers' => $drivers, 'cars' => $cars, 'locations'=>$locations]);
}
public function booking($id){
$page=pages::where('page','=','carbooking')->first();
if (str_contains($id, "bookid=")) { // when id has booking id
$bookid = substr($id,7);
$bookdata = DB::table('availabilities')->where('id',$bookid)->first();
$bookdata->pudate= Carbon::parse($bookdata->pudate)->format('m/d/Y');
$car = DB::table('cars')->where('id',$bookdata->car_id)->first();
}else{ // for all booking car
$car = DB::table('cars')->where('id',$id)->first();
$bookdata=null;
$bookid=null;
}
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('booking',['page'=>$page, 'car'=>$car, 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'bookdata'=> $bookdata, 'bookid'=>$bookid]);
}
public function contact(){
$page=pages::where('page','=','contact')->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('contact',['page'=>$page, 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations]);
}
public function detail($id){
$page=pages::where('page','=','cardetail')->first();
$car = DB::table('cars')->where('id',$id)->first();
$relatedcars = DB::table('cars')->select('*')->whereNotIn('id',[$id])->get()->take(4);
// dd( $relatedcars);
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('detail',['page'=>$page, 'car'=>$car, 'relatedcars' => $relatedcars, 'drivers' => $drivers, 'cars' => $cars, 'locations'=>$locations]);
}
public function service(){
$page=pages::where('page','=','service')->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('service',['page'=>$page, 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations]);
}
public function team(){
$page=pages::where('page','=','theteam')->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('team',['page'=>$page, 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations]);
}
public function car(){
$page=pages::where('page','=','carlist')->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('car',['page'=>$page, 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations]);
}
public function testimonial(){
$page=pages::where('page','=','testimonial')->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
$testimonials = DB::table('testimonials')->get();
return view('testimonial',['page'=>$page , 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'testimonials'=>$testimonials]);
}
# driver profile show
public function driverProfile($id)
{
$page=pages::where('page','=','driverProfile')->first();
$idDr = driver::where('id',$id)->first();
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
return view('driverProfile',['page'=>$page , 'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'data'=>$idDr]);
}
public function confmac(Request $req){
$enrr = new enquiry;
$enrr->name = $req->enname;
$enrr->email = $req->enemail;
$enrr->subject = $req->ensubject;
$enrr->message = $req->enmsgbdy;
$enrr->save();
return redirect('contact')->with('success','Mail sent successfully.');
}
public function clcontact(Request $req)
{
$enrr = new enquiry;
$enrr->name = $req->enname;
$enrr->email = $req->enemail;
$enrr->subject = $req->ensubject;
$enrr->message = $req->enmsgbdy;
$enrr->save();
// $data= array('name'=>$req->enname);
// Mail::send(['data'=>'mailsend'], $data, function($message) use ($req){
// $message->to($req->enemail,$req->enname)->subject('Feedback from Royal Cars');
// $message->text('Hello '.$req->enname.','.PHP_EOL.' We received your mail, Our employee contact with you soon.'.PHP_EOL.'Thank you');
// $message->from('sk.saifuddin@brainiuminfotech.com','Royal Cars SK Saifuddin');
// });
$adminmail=[
'name'=> $req->enname,
'email'=> $req->enemail,
'subject'=> $req->ensubject,
'message'=>'Hello '.$req->enname.','.PHP_EOL.' We received your mail, Our employee contact with you soon.'.PHP_EOL.'Thank you'
];
Mail::to($enrr->email)->send(new adminMail($adminmail));
return redirect('/')->with('success','Mail Sent Successfully.');
}
// CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS // CAR DATA CAR MODEL CAR MIGRATIONS
// booking details save to db
public function booking_details(Request $req)
{
$req->validate([
'mobile' =>'required',
'puloc' => 'required',
'drloc' => 'required',
'pudate' => 'required',
'putime' => 'required',
'personAd'=> 'required',
'personCh'=> 'required',
'message'=> 'required',
'payment'=> 'required',
'driverSel'=> 'required',
]);
$car = Car::find($req->car_id);
$start_date = Carbon::parse($req->pudate)->toDateTimeString();
$user = user::where('id',session()->get('user_id') )->first();
if(isset($user)){
if(! isDriverLoc($req->driverSel, $req->puloc, $req->drloc)){
return redirect()->back()->with('error','Driver is Not Available for these Locations. Locations are: '.DriverLocas($req->driverSel));
}
$srch_date = Carbon::parse($req->pudate)->format('Y-m-d'); //srch for available drivers
$bookingChecks = DB::table('bookings')->get();
foreach($bookingChecks as $singleBk){
if($singleBk->pudate == $srch_date && $singleBk->status=='1' && $singleBk->driver_id== $req->driverSel ){
return redirect()->back()->with('error','Driver is Not Available.');
}
if($singleBk->avai_id==$req->bookid){
return redirect()->back()->with('error','Already Booked. Nice Try!!');
}
}
if($user->role_id=='3') {
$data = DB::table('bookings')->insert([
'car_id'=> $req->car_id,
'customer_id'=> $user->id,
'avai_id'=>$req->bookid,
'driver_id'=> $req->driverSel,
'mobile' => $req->mobile,
'puloc' => $req->puloc,
'drloc' => $req->drloc,
'pudate' => $start_date ,
'putime' => $req->putime,
'personAd' => $req->personAd,
'personCh'=> $req->personCh,
'message' => $req->message,
'paymentMode' => $req->payment,
'total' => $car->price,
'status' => '2',
]);
$statusChange =availability::where('id',$req->bookid)->update(['available'=>'2']);
return redirect()->back()->with('success','Booking Set Successfully.');
}else{
return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
}
}else{
return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
}
}
// customer must login check
// check available function for register in DB
public function chck_avail(Request $req)
{
$user = user::where('id',session()->get('user_id') )->first();
if(isset($user)){
$srch_date = Carbon::parse($req->pudate)->format('Y-m-d'); //srch for available drivers
$bookingChecks = DB::table('bookings')->get();
foreach($bookingChecks as $singleBk){
if($singleBk->pudate == $srch_date && $singleBk->driver_id==$req->driverSel && $singleBk->status=='1'){
return redirect()->back()->with('error','Driver is Not Available.');
}
}
if(! isDriverLoc($req->driverSel, $req->puloc, $req->drloc)){
return redirect()->back()->with('error','Driver is Not Available for these Locations. Locations are: '.DriverLocas($req->driverSel));
}
if($user->role_id=='3') {
$pudate = Carbon::parse($req->pudate)->toDateTimeString();
$data =DB::table('availabilities')->insert([
'customer_id' => $user->id,
'car_id'=> $req->car_id,
'driver_id'=> $req->driverSel,
'puloc'=> $req->puloc,
'droploc' => $req->drloc,
'pudate'=> $pudate,
'putime'=> $req->putime,
'available'=> null,
'mail'=> '0',
]);
return redirect()->back()->with('success','Checking of Availability Set Successfully.');
}else{
return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
}
}else{
return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
}
}
// NOT USING FUNCTION
// search field function search method
//
// public function search_avail(Request $req)
// {
// $user = user::where('id',session()->get('user_id') )->first();
// if(isset($user)){
// $srch_date = Carbon::parse($req->pudate)->format('Y-m-d'); //srch for available drivers & cars
// $carIds = array();
// $bookingChecks = DB::table('bookings')->get();
// if(!isset($req->car_id)) {
// foreach($bookingChecks as $singleBk){
// if($singleBk->pudate == $srch_date && $singleBk->status=='1' ){
// array_push($carIds , $singleBk->car_id);
// } // 1, 7, 8 is booked drivers
// }
// }else{
// foreach($bookingChecks as $singleBk){
// if(($singleBk->pudate == $srch_date && $singleBk->status=='1' ) || ( $singleBk->car_id == $req->car_id ) ){
// array_push($carIds , $singleBk->car_id);
// } // 1, 7, 8 is booked drivers
// }
// }
// $availCars = car::whereNotIn('id',$carIds)->get();
// $driverIds = array();
// $bookingChecks = DB::table('bookings')->get();
// if(!isset($req->driverSel)){
// foreach($bookingChecks as $singleBk){
// if($singleBk->pudate == $srch_date && $singleBk->status=='1' ){
// array_push($driverIds , $singleBk->driver_id);
// } // 1, 7, 8 is booked drivers
// }
// }else{
// foreach($bookingChecks as $singleBk){
// if( ($singleBk->pudate == $srch_date && $singleBk->status=='1') || ( $singleBk->driver_id == $req->driverSel)){
// array_push($driverIds , $singleBk->driver_id);
// } // 1, 7, 8 is booked drivers
// }
// }
// $availDrivers = driver::whereNotIn('id',$driverIds)->get();
// $drivers = driver::all();
// $cars = car::all();
// $locations = DB::table('locations')->get();
// $page=pages::where('page','=','search')->first();
// return view('searchResults',['page'=>$page ,'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'availCars'=> $availCars, 'availDrivers'=> $availDrivers,'req'=>$req]);
// }else{
// return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
// }
// }
// search for check available in royal car search button at top
function srchFromAvai(Request $req){
$user = user::where('id',session()->get('user_id') )->first();
if(isset($user)){
if(isset($req->drloc))
$drloc = [$req->drloc];
else
$drloc = location::select('id')->get();
if(isset($req->puloc))
$ploc = [$req->puloc];
else
$ploc = location::select('id')->get();
if(isset($req->car_id))
$car_id = [$req->car_id];
else
$car_id = car::select('id')->get();
if(isset($req->driverSel))
$d_id = [$req->driverSel];
else
$d_id = driver::select('id')->get();
if(isset($req->pudate)){
$srch_date = Carbon::parse($req->pudate)->format('Y-m-d');
$data= availability::where('customer_id',$user->id)->where('pudate',$srch_date)->whereIn('droploc',$drloc)->whereIn('puloc',$ploc)->whereIn('car_id',$car_id)->whereIn('driver_id',$d_id)->get();
}
else{
$mytime = Carbon::today();
$futureDate = Carbon::now();
$futureDate->addDays(60);
// dd($futureDate);
$data= availability::where('customer_id',$user->id)->whereIn('droploc',$drloc)->whereIn('puloc',$ploc)->whereIn('car_id',$car_id)->whereBetween('pudate',[$mytime->toDateTimeString(), $futureDate->toDateTimeString()])->whereIn('driver_id',$d_id)->get();
}
$drivers = driver::all();
$cars = car::all();
$locations = DB::table('locations')->get();
$page=pages::where('page','=','search')->first();
return view('avaiReqSrch',['page'=>$page ,'cars'=>$cars, 'drivers' => $drivers,'locations'=>$locations, 'req'=>$req, 'data'=>$data]);
}else{
return redirect('adlogin')->with('wrlgcr','You are not logged in, Login to Continue.');
}
}
}
customerController.blade.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\user;
use App\Models\pages;
use App\Models\Role;
use App\Models\enquiry;
use App\Models\car;
use App\Models\booking;
use App\Models\driver;
use App\Models\availability;
use App\Models\testimonial;
use Hash;
use Session;
use DB;
use App\Mail\adminMail;
use Illuminate\Support\Facades\Mail;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
class CustomerController extends Controller
{
public function chkRequests()
{
$user = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::select("*")->where('customer_id',$user->id)->paginate(5);
// dd($data);
return view('customer.chkRequest',['adeu' => $user, 'data'=>$data]);
}
// search field on Admin Show all available request list
// get method act as post
// Joining multiple table and check using where clause
public function RequestSrch_cs(Request $req){
$srch= $req->input('srch');
if(strtoupper($srch) == 'NO MAILS') {
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::where('mail','0')->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}else if(strtoupper($srch) == 'MAIL SENT'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::where('mail','1')->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'NO RESPONSE'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::where('available',null)->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'REJECTED'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::where('available','0')->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
else if( strtoupper($srch) == 'AVAILABLE'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::where('available','1')->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data= availability::join('drivers','drivers.id', '=', 'availabilities.driver_id')
->join('cars', 'cars.id', '=', 'availabilities.car_id')
->join('locations', 'locations.id', '=', 'availabilities.puloc')
->join('locations as l2', 'l2.id', '=', 'availabilities.droploc')
->join('users', 'users.id', '=', 'availabilities.customer_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->orWhere('cars.name', 'LIKE','%'.$srch.'%')
->orWhere('cars.brand', 'LIKE','%'.$srch.'%')
->orWhere('locations.area', 'LIKE','%'.$srch.'%')
->orWhere('availabilities.pudate', 'LIKE','%'.$srch.'%')
->orWhere('availabilities.putime', 'LIKE','%'.$srch.'%')
// ->orWhere('users.name', 'LIKE','%'.$srch.'%')
->orWhere('l2.area', 'LIKE','%'.$srch.'%')
->get();
// dd( $data);
return view('customer.chkRequest',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
// date wise availability search
public function avai_date_srch_cs(Request $req)
{
$start_date = Carbon::parse($req->start_date)->toDateTimeString();
$end_date = Carbon::parse($req->end_date)->toDateTimeString();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = availability::whereBetween('pudate', [$start_date, $end_date])->where('customer_id',$adfn->id)->get();
return view('customer.chkRequest',['data'=>$data,'adeu' => $adfn, 'req'=>$req]);
}
// chkBooking blade view page fetch
// Booking page view fun
public function chkBooking()
{
// dd('admin booking page');
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
// dd($adfn) ;
$data = booking::where('customer_id',$adfn->id)->paginate(5);
return view('customer.chkBooking',['adeu' => $adfn, 'data'=>$data]);
}
// taking input field booking search
public function BookingSrch_cs(Request $req){
$srch= $req->input('srch');
if( strtoupper($srch) == 'NO RESPONSE'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::where('status','2')->where('customer_id',$adfn->id)->get();
return view('customer.chkBooking',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}else if( strtoupper($srch) == 'BOOKING CANCLE'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::where('status','0')->where('customer_id',$adfn->id)->get();
return view('customer.chkBooking',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
else if( strtoupper($srch) == 'BOOKING CONFIRM'){
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::where('status','1')->where('customer_id',$adfn->id)->get();
return view('customer.chkBooking',['adeu' => $adfn, 'data'=>$data, 'srchbck'=>$srch]);
}
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data= booking::join('drivers','drivers.id', '=', 'bookings.driver_id')
->join('cars', 'cars.id', '=', 'bookings.car_id')
->join('locations', 'locations.id', '=', 'bookings.puloc')
->join('locations as l2', 'l2.id', '=', 'bookings.drloc')
->join('users', 'users.id', '=', 'bookings.customer_id')
->where('drivers.name','LIKE', '%'.$srch.'%')
->orWhere('cars.name', 'LIKE','%'.$srch.'%')
->orWhere('cars.brand', 'LIKE','%'.$srch.'%')
->orWhere('locations.area', 'LIKE','%'.$srch.'%')
->orWhere('bookings.pudate', 'LIKE','%'.$srch.'%')
->orWhere('bookings.mobile', 'LIKE','%'.$srch.'%')
->orWhere('bookings.putime', 'LIKE','%'.$srch.'%')
->orWhere('l2.area', 'LIKE','%'.$srch.'%')
->get();
// dd( $data);
// dd('ok');
return view('customer.chkBooking',['adeu' => $adfn, 'data'=>$data,'srchbck'=>$srch]);
}
// date wise booking search
public function bkk_date_srch_cs(Request $req)
{
$start_date = Carbon::parse($req->start_date)->toDateTimeString();
$end_date = Carbon::parse($req->end_date)->toDateTimeString();
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::whereBetween('pudate', [$start_date, $end_date])->where('customer_id',$adfn->id)->get();
return view('customer.chkBooking',['data'=>$data,'adeu' => $adfn, 'req'=>$req]);
}
# Customer check ride status on idwise here
public function myTrip($id)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data=booking::where('avai_id',$id)->first();
$driverData = driver::where('id',$data->driver_id)->first();
return view('customer.myTrip',['item'=>$data,'adeu' => $adfn, 'driverData'=>$driverData]);
}
public function myTrip2($id)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data=booking::where('id',$id)->first();
// dd($data) ;
$driverData = driver::where('id',$data->driver_id)->first();
return view('customer.myTrip',['item'=>$data,'adeu' => $adfn, 'driverData'=>$driverData]);
}
# Customer add testimonial when
public function addTesti($id)
{
$adfn = user::where('email',session()->get('adeu')['email'] )->first();
$data = booking::where('id',$id)->first();
return view('customer.fdFormSubmit',['adeu' => $adfn, 'item'=>$data]);
}
public function submitTesti(Request $req)
{
$testiData= DB::table('testimonials')->get();
foreach($testiData as $data){
if($req->bkk_id == $data->book_id)
{
return "<script>window.close();</script>";
}
}
$data = booking::where('id',$req->bkk_id)->first();
$testimonial = DB::table('testimonials')->insert(['book_id'=>$req->bkk_id,'message'=>$req->message,'rating'=>$req->rating,'status'=>'1']);
return "<script>window.close();</script>";
}
}
Driver.blade.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Notification;
use Carbon\Carbon;
use DB;
use App\Notifications\SendEmailNotification;
use Illuminate\Support\Facades\Mail;
use App\Mail\clMail;
use App\Mail\adminMail;
use App\Mail\FeedbackMail;
use App\Models\booking;
use App\Models\enquiry;
use App\Models\driver;
use App\Models\pages;
use App\Models\Car;
use App\Models\user;
use App\Models\Role;
use App\Models\availability;
use App\Models\location;
use Hash;
use Session;
use Illuminate\Support\Facades\Auth;
class DriverController extends Controller
{
# driver homepage view blade
public function driver_portal(){
$cars = car::all();
$customers = user::where('role_id','3')->get();
$locations = DB::table('locations')->get();
return view('driver.driver_portal',[ 'customers' => $customers, 'cars' => $cars, 'locations'=>$locations ]);
}
#Search for customer booking related data
public function SrchCustmrasDriver(Request $req)
{
$user = driver::where('id',session()->get('driver_id') )->first();
if(isset($user)){
if(isset($req->drloc))
$drloc = [$req->drloc];
else
$drloc = location::select('id')->get();
if(isset($req->puloc))
$ploc = [$req->puloc];
else
$ploc = location::select('id')->get();
if(isset($req->car_id))
$car_id = [$req->car_id];
else
$car_id = car::select('id')->get();
if(isset($req->customerSel))
$c_id = [$req->customerSel];
else
$c_id = user::select('id')->where('role_id','3')->get();
if(isset($req->pudate)){
$srch_date = Carbon::parse($req->pudate)->format('Y-m-d');
$data= booking::where('driver_id',$user->id)->where('pudate',$srch_date)->whereIn('drloc',$drloc)->whereIn('puloc',$ploc)->whereIn('car_id',$car_id)->whereIn('customer_id',$c_id)->get();
}
else{
$mytime = Carbon::today();
$futureDate = Carbon::now();
$futureDate->addDays(60);
$data= booking::where('driver_id',$user->id)->whereIn('drloc',$drloc)->whereIn('puloc',$ploc)->whereIn('car_id',$car_id)->whereBetween('pudate',[$mytime->toDateTimeString(), $futureDate->toDateTimeString()])->whereIn('customer_id',$c_id)->get();
}
$cars = car::all();
$customers = user::where('role_id','3')->get();
$locations = DB::table('locations')->get();
return view('driver.search_bkkngs',['customers' => $customers, 'cars'=>$cars, 'locations'=>$locations, 'req'=>$req, 'data'=>$data]);
}else{
return redirect('driverLogin')->with('error','You are not logged in, Login to Continue.');
}
}
# register page blade
public function driverRegister(Request $req)
{
return view('driver.driverRegister');
}
#register form submit
public function driver_reg(Request $req)
{
$req->validate([
'name' => 'required',
'email' => 'required|email|unique:drivers',
'password' => 'required',
'phone' => 'required',
'address' => 'required',
'licenceNo' => 'required',
'carNo' => 'required',
'experience' => 'required',
'adimg' => 'required|image|mimes:jpg,jpeg,png'
]);
$file_type = $req->file('adimg')->extension(); // image
$file_path = $req->file('adimg')->storeAs('admin/images/driver', time() . '.' . $file_type, 'public');
$req->file('adimg')->move(public_path('admin/images/driver'), time() . '.' . $file_type);
DB::table('drivers')->insert([
'name' => $req->name,
'email' => $req->email,
'password' => Hash::make($req->password),
'phone' => $req->phone,
'address' => $req->address,
'licenceNo' => $req->licenceNo,
'carNo' => $req->carNo,
'experience' => $req->experience,
'image' => $file_path,
'salary' => '18000',
]);
Session::flash('status', "Successfully Registered");
return redirect('driver');
}
# login blade
public function driverLogin()
{
return view('driver.login');
}
# login action
public function driver_login(Request $req)
{
$req->validate([
'email' => 'required',
'password' => 'required',
]);
$driver = driver::where('email',$req->email)->first();
$drivercnt = driver::where('email',$req->email)->count();
if($drivercnt > 0){
if($driver->active){
if(Hash::check($req->password, $driver->password )){
$req->session()->put('driver',$driver);
$req->session()->put('driver_id',$driver->id);
// Auth::login($driver);
return redirect('driver')->with('status',' Login Successfully. ');
}else{
return redirect()->back()->with('error','Username or Password does not match');
}
}else{
return redirect()->back()->with('error','You are blocked.');
}
}else{
return redirect()->back()->with('error','Username or Password does not match');
}
}
// on Request table page view blade get
public function onRequest()
{
$id= session()->get('driver_id');
$data = driver::where('id',$id)->first();
$onReq = availability::where('driver_id',$id)->get();
$cars = car::all();
$customers = user::where('role_id','3')->get();
$locations = DB::table('locations')->get();
return view('driver.onRequest',[ 'customers' => $customers, 'cars' => $cars, 'locations'=>$locations, 'data'=>$data, 'onReq'=>$onReq ]);
// return view('driver.onRequest',['data'=>$data, 'onReq'=>$onReq]);
}
// Driver change availability
public function dvr_availunavail($id, $status)
{
$onReq = availability::where('id',$id)->get();
if($status=='true'){
$c=1;
}else if($status=='false'){
$c=0;
}else{
$c=null;
}
$pg = DB::table('availabilities')
->where('id', $id)
->update(['available' =>$c ]);
return redirect()->back()->with('status',' Availability Changing Successfully');
}
// driver available mail sending id-> $req->a_id
public function dvr_rply(Request $req)
{
$enrr = availability::find($req->a_id);
$cust = user::find($enrr->customer_id);
$car = car::find($enrr->car_id);
$driver = driver::find($enrr->driver_id);
$puloc = location::find( $enrr->puloc);
$droploc = location::find( $enrr->droploc);
$message = 'Hello '.$cust->name.', '.PHP_EOL.'Car Name: '.$car->name.PHP_EOL.'Car Brand: '.$car->brand.PHP_EOL.'At Price: '.$car->price.PHP_EOL.'Pickup Location: '.$puloc->area.PHP_EOL.'Drop Location: '.$droploc->area.PHP_EOL.'Pickup Date: '.$enrr->pudate.PHP_EOL.'Pickup Time: '.$enrr->putime.PHP_EOL.'Driver Name: '.$driver->name.PHP_EOL.PHP_EOL.'Thank you, Visit Again. ';
$adminmail=[
'name'=> $cust->name,
'email'=> $cust->email,
'subject'=> 'Car Available at '.$puloc->area.' Date: '.$enrr->pudate,
'message'=> $message,
];
Mail::to($cust->email)->send(new adminMail($adminmail));
DB::table('availabilities')->where('id',$req->a_id)->update(['mail' => '1']);
return view('admin.mailreply',['AdminReply'=>$adminmail]);
}
# Driver blade view
public function driverAccount()
{
$id= session()->get('driver_id');
$data = driver::where('id',$id)->first();
return view('driver.account',['data'=>$data]);
}
// driver_update
public function driver_update(Request $req)
{
$req->validate([
'name' => 'required',
'email' => 'required|email|unique:drivers,email,'.$req->adid,
'phone' => 'required',
'address' => 'required',
'licenceNo' => 'required',
'carNo' => 'required',
'experience' => 'required',
'adimg' => 'image|mimes:jpg,jpeg,png'
]);
if ($req->hasFile('adimg')) {
if($req->adimg !='' )
unlink($req->old_img);
$file_type = $req->file('adimg')->extension();
$file_path = $req->file('adimg')->storeAs('admin/images/driver', time() . '.' . $file_type, 'public');
$req->file('adimg')->move(public_path('admin/images/driver'), time() . '.' . $file_type);
}else{
$file_path=$req->old_img;
}
$adur = DB::table('drivers')
->where('id', $req->adid)
->update([
'name' => $req->name,
'email' => $req->email,
'phone' => $req->phone,
'address' => $req->address,
'licenceNo' => $req->licenceNo,
'carNo' => $req->carNo,
'experience' => $req->experience,
'image' => $file_path,
]);
Session::flash('status', "Records Updated Successfully");
return redirect('driver');
}
// driver Password view blade load
public function driverPassword()
{
$id= session()->get('driver_id');
$data = driver::where('id',$id)->first();
return view('driver.pswdchng',['data'=>$data]);
}
// driver Logout
public function driverLogout()
{
if(session()->has('driver_id')){
session()->forget('driver_id');
}
return redirect('driver');
}
// password change
function driver_Pass_Chng(Request $req){
$id= session()->get('driver_id');
$data = driver::where('id',$id)->first();
$datacnt = driver::where('id',$id)->count();
if($datacnt > 0){
if(Hash::check($req->op, $data->password )){
if($req->op != $req->np){
if($req->np == $req->cp){
$adur = DB::table('drivers')
->where('id', $id)
->update([
'password' => Hash::make($req->np),
]);
Session::flash('status', "Password Updated Successfully");
return redirect('driver');
}else{
return redirect()->back()->with('error','** New Password and Confirm Password does not match');
}
}else{
return redirect()->back()->with('error','** Old Password and New Password are Same.');
}
}else{
return redirect()->back()->with('error','** Old Password and Database Password does not match');
}
}else{
return redirect()->back()->with('error','** Invalid User');
}
}
// booking table driver view page
function bookings(){
$id= session()->get('driver_id');
$data = driver::where('id',$id)->first();
$onReq = booking::where('driver_id',$id)->get();
return view('driver.onBooking',['data'=>$data, 'onReq'=>$onReq]);
}
// Driver booking Confirm
public function bookingConfirm($id, $status)
{
$bookReq = booking::where('id',$id)->first();
$Did= session()->get('driver_id');
$onReq = availability::where('pudate',$bookReq->pudate)->get(); // dd($bookReq); // dd($bookReq->pudate); dd($onReq);
if($status=='true'){
$c=1;
if(count($onReq)>0){
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->where('id',$bookReq->avai_id)
->update(['available' => '3' ]);
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->whereNotIn('id',[$bookReq->avai_id])
->where('available',null)
->update(['available' => '5' ]);
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->whereNotIn('id',[$bookReq->avai_id])
->whereIn('available',['1','2'])
->update(['available' => '0' ]);
}
$othrOnDateBookingDisabled = booking::whereNotIn('id',[$id])->where('pudate',$bookReq->pudate)->where('driver_id', $Did)->update(['status' => '0' ]);
}else if($status=='false'){
$c=0;
}else{
$c=2;
if(count($onReq)>0){
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->where('id',$bookReq->avai_id)
->update(['available' => '1' ]);
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->whereNotIn('id',[$bookReq->avai_id])
->where('available','5')
->update(['available' => null ]);
$upAv = DB::table('availabilities')
->where('driver_id', $Did)
->where('pudate',$bookReq->pudate)
->where('available','0')
->update(['available' => '1' ]);
}
$othrOnDateBookingDisabled = booking::whereNotIn('id',[$id])->where('pudate',$bookReq->pudate)->where('driver_id', $Did)->update(['status' => '2' ]);
}
$pg = DB::table('bookings')
->where('id', $id)
->update(['status' =>$c ]);
return redirect('bookings')->with('status',' Availability Changing Successfully');
}
# driver earnings blade
public function earnings()
{
$data = booking::where('status','1')->orderBy('pudate', 'DESC')->get();
return view('driver.earnings',['onReq'=>$data]);
}
public function regTrips($id,$status)
{
if($status=='start'){
booking::where('id',$id)->update(['bookStatus'=>'0']);
}
else if($status=='arrive'){
booking::where('id',$id)->update(['bookStatus'=>'1']);
}
else if($status=='pickup'){
booking::where('id',$id)->update(['bookStatus'=>'2']);
}
else if($status=='drop'){
booking::where('id',$id)->update(['bookStatus'=>'3']);
}
else if($status=='paySuccess'){
booking::where('id',$id)->update(['bookStatus'=>'4']);
}
else if($status=='payDue'){
booking::where('id',$id)->update(['bookStatus'=>'5']);
}
else if($status=='sos'){
booking::where('id',$id)->update(['bookStatus'=>'6']);
}
return redirect()->back()->with('status','Driver Trip Updated');
}
public function viewTrip($id)
{
$data = booking::where('id',$id)->first();
return view('driver.viewTrip',['item'=>$data]);
}
// driver send feedback mail
public function feedbackMailSend($id)
{
$enrr = booking::where('id',$id)->first();
$customer = DB::table('users')->where('id',$enrr->customer_id)->first();
Mail::to($customer->email)->send(new FeedbackMail($id));
return redirect()->back();
}
}
Comments
Post a Comment