Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $today = date('Y-m-d');
- $reservations = DB::table('reservations')
- ->join('client_service', 'client_service.id', '=', 'reservations.client_service_id')
- ->join('users', 'users.id', '=', 'reservations.user_id')
- ->join('clients', 'clients.id', '=', 'reservations.client_id')
- ->join('services', 'services.id', '=', 'client_service.service_id')
- ->join('branchs', 'branchs.id', '=', 'reservations.branch_id')
- ->where('reservations.client_id', '=' , Auth::user()->client_id)
- ->where('reservations.branch_id', '=' , Auth::user()->branch_id)
- ->where('reservations.status','=','Create')
- ->select('reservations.*','services.service_name','clients.brand_name','users.email','users.name', 'branchs.sub_district')
- ->whereRaw("date(reservations.reserved_date) = '". date('Y-m-d') . "'")
- ->get();
- return view('client.index',compact('reservations'));
- @extends('master-client')
- @section('content')
- @foreach($reservations as $row)
- <div class="alert alert-success alert-dismissable">
- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
- <h4> <i class="icon fa fa-check"></i> New Reservation</h4>
- Nama : {{ $row->name }} <br>
- Jam : <?php $datetime=explode(' ',$row->reserved_date);
- $date=$datetime[0];
- $time=$datetime[1];
- echo $time;
- ?>
- </div>
- @endforeach
- @stop
Advertisement
Add Comment
Please, Sign In to add comment