コード例 #1
0
 public function updateTransactionStatus()
 {
     $id = Input::get('id');
     $status = Input::get('status');
     $getTransaction = CottageReservation::find($id);
     $getTransaction['status'] = $status;
     if (!$getTransaction->save()) {
         return 1;
     } else {
         if ($status == "Reserved") {
             $userInfo = UserInfo::where('user_id', '=', $getTransaction['user_id'])->first();
             $emailcontent = array('fname' => $userInfo['firstname'], 'lname' => $userInfo['lastname'], 'link' => URL::route('getReservation_step2', Input::get('id')));
             Mail::send('emails.confirmation.reserve', $emailcontent, function ($message) {
                 $id = Input::get('id');
                 $getTransaction = CottageReservation::find($id);
                 $userInfo = UserInfo::where('user_id', '=', $getTransaction['user_id'])->first();
                 $message->to($userInfo['email'], 'Kalugdan Garden Resort')->subject('Kalugdan Garden Resort Confirmation Email');
             });
         }
         if ($status == "Void") {
             $userInfo = UserInfo::where('user_id', '=', $getTransaction['user_id'])->first();
             $emailcontent = array('fname' => $userInfo['firstname'], 'lname' => $userInfo['lastname'], 'link' => URL::route('getReservation_step2', Input::get('id')));
             Mail::send('emails.confirmation.void', $emailcontent, function ($message) {
                 $id = Input::get('id');
                 $getTransaction = CottageReservation::find($id);
                 $userInfo = UserInfo::where('user_id', '=', $getTransaction['user_id'])->first();
                 $message->to($userInfo['email'], 'Kalugdan Garden Resort')->subject('Kalugdan Garden Resort Confirmation Email');
             });
         }
         return 0;
     }
 }
コード例 #2
0
    $( '#date' ).datepicker({
    'formatDate': 'Y-m-d H:i:s'

    });

    $('#time').timepicker({
    timeFormat: 'hh:mm tt'
    });
    });
    </script>
@stop
@section('content')
<?php 
$id = Auth::User()['id'];
$userInfo = UserInfo::find($id);
$reservation = CottageReservation::find($reserve_id);
$getcountcheck = count(explode(",", $reservation['cottagelist_id'])) - 1;
$countRoom = empty($reservation['room_id']) ? 0 : 1;
$userInfo = UserInfo::where('user_id', '=', $reservation['user_id'])->first();
$package = RoomPackage::where('packid', '=', $reservation['package_id'])->first();
$cottageType = CottageType::where('Cottage_ID', '=', $reservation['cottage_type'])->first();
$price = (int) $cottageType['price'];
$day = $reservation['day_type'];
$season = $reservation['season'];
if ($day == "1") {
    if ($season == "1") {
        $priceAdult = PricingSwimming::where('day', '=', 'Morning')->where('desc_a', '=', 'Adult')->first();
        $priceKid = PricingSwimming::where('day', '=', 'Morning')->where('desc_a', '=', 'Kids')->first();
    } elseif ($season == "2") {
        $priceAdult = PricingSwimming::where('day', '=', 'Weekend And Holiday Morning')->where('desc_a', '=', 'Adult')->first();
        $priceKid = PricingSwimming::where('day', '=', 'Weekend And Holiday Morning')->where('desc_a', '=', 'Kids')->first();