当前位置: 首页>>代码示例>>PHP>>正文


PHP Payment::where方法代码示例

本文整理汇总了PHP中Payment::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::where方法的具体用法?PHP Payment::where怎么用?PHP Payment::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Payment的用法示例。


在下文中一共展示了Payment::where方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $uId = \Input::get('user_id');
     $date = \Input::get('date');
     $check = \Payment::where('emp_id', '=', $uId)->where('pay_date', '=', $date)->first();
     if ($check) {
         echo '{"error":"already exits"}';
         return;
     } else {
         $earn = \Input::get('earned');
         $deduction = \Input::get('deducted');
         $net = \Input::get('net');
         $description = \Input::except('earned', 'deducted', 'net', 'date', 'date_of_salary', '_token', 'user_id');
         $description = json_encode($description);
         $insert = \Payment::insertGetId(array('emp_id' => $uId, 'earning_amount' => $earn, 'deducting_amount' => $deduction, 'total_amount' => $net, 'pay_date' => $date, 'description' => $description));
         if ($insert) {
             $ids = array('uId' => $uId, 'date' => $date, 'eId' => $insert);
             $msg = array('success' => json_encode($ids));
             echo json_encode($msg);
             return;
         } else {
             echo '{"error":"already exits"}';
             return;
         }
     }
 }
开发者ID:bhoopal10,项目名称:PayrollOriginal,代码行数:31,代码来源:SalaryController.php

示例2: report

 public function report()
 {
     //add security to avoid stealing of information
     $user = Auth::user();
     $club = $user->Clubs()->FirstOrFail();
     $type = Input::get('expType');
     $from = date('Ymd', strtotime(Input::get('expFrom')));
     $to = date('Ymd', strtotime(Input::get('expTo')));
     $payments = Payment::where('club_id', '=', $club->id)->with('player')->whereBetween('created_at', array($from, $to))->get();
     $param = array('transaction_type' => 'cc', 'action_type' => 'refund,sale', 'condition' => 'pendingsettlement,complete,failed', 'club' => $club->id, 'start_date' => $from . '000000', 'end_date' => $to . '235959');
     $payment = new Payment();
     $transactions = $payment->ask($param);
     //return $transactions;
     //return json_decode(json_encode($transactions->transaction),true);
     // return View::make('export.lacrosse.accounting.all')
     // ->with('payments',  $transactions->transaction);
     //return json_decode(json_encode($transactions->transaction),true);
     Excel::create('transactions', function ($excel) use($transactions) {
         $excel->sheet('Sheetname', function ($sheet) use($transactions) {
             $sheet->setOrientation('landscape');
             // first row styling and writing content
             $sheet->loadView('export.lacrosse.accounting.all')->with('payments', $transactions->transaction);
         });
     })->download('xlsx');
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:25,代码来源:ExportController.php

示例3: canProceedWithCredit

 /**
  * Use this method to check if the agent can proceed with credit
  *
  * returns true
  */
 public static function canProceedWithCredit($currentAmount)
 {
     $payments = Payment::where('user_id', Auth::id())->sum('amount');
     $totalCredit = self::totalCreditFromAllBookings();
     $creditLimit = self::getCreditLimit(Auth::id());
     $creditLeft = $totalCredit + $currentAmount - $payments;
     return $creditLimit >= $creditLeft;
 }
开发者ID:tharindarodrigo,项目名称:agent,代码行数:13,代码来源:Agent.php

示例4: index

 /**
  * Display a listing of the resource.
  * GET /account
  *
  * @return Response
  */
 public function index()
 {
     $user = Auth::user();
     $title = 'League Together - Club';
     $payment = Payment::where('user_id', $user->id)->with('items')->get();
     $coachCount = count($user->teams()->get());
     return View::make('app.account.index')->with('page_title', $title)->with('payment', $payment)->with('coachCount', $coachCount)->withUser($user);
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:14,代码来源:AccountController.php

示例5: get_info

 public function get_info($id)
 {
     $trans = Payment::where('transaction_id', '=', $id)->first();
     if (empty($trans)) {
         return View::make('msg.error')->with('error', 'This transaction does not exist');
     }
     $settings = IniHandle::readini();
     return View::make('page.admin.transaction.info')->with('trans', $trans)->with('currency', $settings['ppcurrency'])->with('transactions', Payment::where('user_id', '=', $trans->user_id)->order_by('date', 'DESC')->take(15)->get());
 }
开发者ID:albertpaulp,项目名称:PrettyBoot,代码行数:9,代码来源:transaction.php

示例6: create

 /**
  * Show the form for creating a new resource.
  * GET /payments/create
  *
  * @return Response
  */
 public function create($id)
 {
     $invoices = Invoice::with('invoicedetail')->find($id);
     $paymenttypes = Paymenttype::all();
     $total = $invoices->invoicedetail->rent + $invoices->invoicedetail->water + $invoices->invoicedetail->electricity + $invoices->invoicedetail->security;
     $houseid = $invoices->houseID;
     $balance = Payment::where('houseID', $houseid)->sum('balance');
     return View::make('backend.code.payment.create', compact('invoices', 'invoicedetail', 'total', 'balance'));
 }
开发者ID:jeremiteki,项目名称:mteja,代码行数:15,代码来源:PaymentController.php

示例7: index

 public function index()
 {
     $user = Auth::user();
     $club = $user->Clubs()->FirstOrFail();
     $payment = Payment::where('club_id', '=', $club->id)->get();
     $sales = new Payment();
     $title = 'League Together - Club';
     return View::make('app.club.index')->with('page_title', $title)->with('club', $club)->with('payments', $payment)->with('sales', $sales)->withUser($user);
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:9,代码来源:ClubController.php

示例8: post_process

 public function post_process()
 {
     Log::write('PayPal', 'Trying to process IPN');
     Bundle::start('paypal-ipn');
     $listener = new IpnListener();
     //        $listener->use_sandbox = true;
     try {
         $listener->requirePostMethod();
         $verified = $listener->processIpn();
     } catch (Exception $e) {
         Log::info($e->getMessage());
     }
     if ($verified) {
         Log::write('PayPal', 'IPN payment looks verified');
         $data = Input::get();
         $settings = IniHandle::readini();
         if (!in_array($data['payment_status'], array('Completed', 'COMPLETED', 'completed'))) {
             Log::write('PayPal', 'payment not completed');
             return View::make('msg.error')->with('error', 'PayPal: payment not completed');
         }
         if (strtolower($data['receiver_email']) != strtolower($settings['ppemail'])) {
             Log::write('PayPal', 'receive email not same as set in settings. Settings: ' . $settings['ppemail'] . ' ||| PayPal email: ' . $data['receiver_email']);
             return View::make('msg.error')->with('error', 'PayPal: receive email not same as set in settings');
         }
         if (Payment::where('transaction_id', '=', $data['txn_id'])->count() != 0) {
             Log::write('PayPal', 'transaction ID already exists');
             return View::make('msg.error')->with('error', 'PayPal: transaction ID already exists');
         }
         if (strtolower($data['mc_currency']) != strtolower($settings['ppcurrency'])) {
             Log::write('PayPal', 'Currencies do not match');
             return View::make('msg.error')->with('error', 'PayPal: currencies do not match');
         }
         Log::write('PayPal', 'Got past all PLAN controller checks now going into CUSTOM');
         if (strtolower($data['custom']) == 'plan') {
             $result = Payment::verifyPlan($data);
             if (!$result) {
                 return $result;
             }
         } elseif (strtolower($data['custom']) == 'blacklist_skype' || strtolower($data['custom']) == 'blacklist_ip') {
             $result = Payment::verifyBlacklist($data);
             if (!$result) {
                 return $result;
             }
         } else {
             Log::write('PayPal', 'Custom not found, can\'t verify anything');
             return View::make('msg.error')->with('error', 'Fraudulent payment?');
         }
         Log::write('PayPal', 'Now trying to add Payment info to DB');
         $payment = Payment::create(array('user_id' => $data['option_selection1'], 'token' => $data['ipn_track_id'], 'date' => date('Y-m-d H:i:s', time()), 'ack' => $data['payment_status'], 'transaction_id' => $data['txn_id'], 'amount' => $data['mc_gross'], 'paypal_fee' => $data['mc_fee'], 'status' => $data['payment_status'], 'description' => $data['custom']));
         Log::write('PayPal', 'Successful payment, DB id: ' . $payment->id);
     } else {
         Log::write('PayPal', 'IPN listener returns false on check');
     }
     return 'handled';
 }
开发者ID:albertpaulp,项目名称:PrettyBoot,代码行数:55,代码来源:plan.php

示例9: VeryPayment

 public static function VeryPayment()
 {
     if ($user = Sentry::getUser()) {
         $dt = Carbon::now();
         $payment = Payment::where('user_id', $user->id)->first();
         $plan = Plan::find($payment->plan_id);
         $create = Carbon::parse($payment->created_at);
         if ($create->addDays($plan->time) > $dt) {
             return true;
         } else {
             return false;
         }
     }
 }
开发者ID:jnicolasbc,项目名称:admin_swp_com,代码行数:14,代码来源:Plan.php

示例10: fire

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $from = Carbon::now()->subDay()->hour(0)->minute(0)->second(0);
     $to = Carbon::now()->subDay()->hour(23)->minute(59)->second(59);
     $payments = Payment::whereBetween('created_at', array($from, $to))->sum('total');
     $payments2 = Payment::whereBetween('created_at', array($from, $to))->sum('service_fee');
     $payments3 = Payment::whereBetween('created_at', array($from, $to))->sum('subtotal');
     $payments4 = Payment::where('created_at', '>=', Carbon::now()->startOfMonth())->sum('total');
     //return Log::info($yesterday);
     //return Log::info($payments);
     $data = array('payments' => $payments, 'fees' => $payments2, 'subtotal' => $payments3, 'month' => $payments4);
     $mail = Mail::send('emails.notification.report.daily', $data, function ($message) {
         $message->to('jayclayton@netzero.net', 'Jay Clayton')->cc('brooks.carter@leaguetogether.com', 'Brooks Carter')->bcc('jayclayton@netzero.net', 'Jay Clayton')->subject("Daily Volume Summary");
     });
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:20,代码来源:DailySummary.php

示例11: getPaymentsList

 public function getPaymentsList()
 {
     $data = Input::all();
     //        dd($data);
     if (Input::get('search')) {
         $validator = Validator::make($data, array('from_date' => 'required|date', 'to_date' => 'required|date'));
         if ($validator->fails()) {
             return Redirect::back()->with($validator->errors());
         }
         $from = Input::get('from_date');
         $to = Input::get('to_date');
         $payments = Payment::where('payment_date_time', '>=', $from)->where('payment_date_time', '<=', $to)->get();
         //            dd($payments);
     } else {
         $payments = Payment::all();
     }
     return View::make('payments.index', compact('payments', 'from', 'to'));
 }
开发者ID:tharindarodrigo,项目名称:agent,代码行数:18,代码来源:PaymentsController.php

示例12: postGenerateReport

 public function postGenerateReport()
 {
     //verify the user input and create account
     $validator = Validator::make(Input::all(), array('Start_Date' => 'required', 'End_Date' => 'required'));
     if ($validator->fails()) {
         return Redirect::route('payment-get')->withErrors($validator)->withInput();
     } else {
         $startdate = date("Y-m-d", strtotime(Input::get('Start_Date')));
         $enddate = date("Y-m-d", strtotime(Input::get('End_Date')));
         if ($startdate <= $enddate) {
             $payments = Payment::where('withdrawal_date', '>=', $startdate)->where('withdrawal_date', '<=', $enddate)->get();
             View::share('startdate', $startdate);
             View::share('enddate', $enddate);
             View::share('payments', $payments);
             return View::make('members.paymentreportfeedback');
         } else {
             return Redirect::route('reports-get')->withInput()->with('global', 'Failed, Please Enter The Correct Date Formats');
         }
     }
 }
开发者ID:franqq,项目名称:openAdvertiser,代码行数:20,代码来源:PaymentController.php

示例13: indexthn

 public function indexthn()
 {
     $date = \Carbon\Carbon::now();
     $menu = Menu::where('tipe', Sentry::getUser()->last_name)->get();
     $jenjang = Sentry::getUser()->last_name;
     $thn = Input::get('tahun');
     $spay = Payment::where('user_id', Sentry::getUser()->id)->where(DB::raw('year'), '=', date('Y'))->where('verifikasi', '1')->first();
     if ($jenjang === 'SMA') {
         $runpas = Contest::where('nocontest', 'Lari 50m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $runpis = Contest::where('nocontest', 'Lari 50m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $tppas = Contest::where('nocontest', 'Tolak Peluru pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $tppis = Contest::where('nocontest', 'Tolak Peluru pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ltpas = Contest::where('nocontest', 'Lompat Tinggi pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ltpis = Contest::where('nocontest', 'Lompat Tinggi pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         return View::make('contests.index', compact('contests'))->withTitle('Lomba')->with('menu', $menu)->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('tppas', $tppas)->with('tppis', $tppis)->with('ltpas', $ltpas)->with('ltpis', $ltpis)->with('thn', $thn)->with('spay', $spay);
     } elseif ($jenjang === 'SMP') {
         $runpas = Contest::where('nocontest', 'Lari 60m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $runpis = Contest::where('nocontest', 'Lari 60m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $tppas = Contest::where('nocontest', 'Tolak Peluru pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $tppis = Contest::where('nocontest', 'Tolak Peluru pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ltpas = Contest::where('nocontest', 'Lompat Tinggi pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ltpis = Contest::where('nocontest', 'Lompat Tinggi pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         return View::make('contests.index', compact('contests'))->withTitle('Lomba')->with('menu', $menu)->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('tppas', $tppas)->with('tppis', $tppis)->with('ltpas', $ltpas)->with('ltpis', $ltpis)->with('thn', $thn)->with('spay', $spay);
     } elseif ($jenjang == 'SD') {
         $runpas = Contest::where('nocontest', 'Lari 50m pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $runpis = Contest::where('nocontest', 'Lari 50m pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpas = Contest::where('nocontest', 'Lompat Jauh pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $ljpis = Contest::where('nocontest', 'Lompat Jauh pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $lbpas = Contest::where('nocontest', 'Lempar Bola pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $lbpis = Contest::where('nocontest', 'Lempar Bola pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $lespa = Contest::where('nocontest', 'Lari Estafet pa')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         $lespi = Contest::where('nocontest', 'Lari Estafet pi')->where('user_id', Sentry::getUser()->id)->where(DB::raw('tahun'), '=', $thn)->get();
         return View::make('contests.index', compact('contests'))->withTitle('Lomba')->with('menu', $menu)->with('runpas', $runpas)->with('runpis', $runpis)->with('ljpas', $ljpas)->with('ljpis', $ljpis)->with('lbpas', $lbpas)->with('lbpis', $lbpis)->with('lespa', $lespa)->with('lespi', $lespi)->with('thn', $thn)->with('spay', $spay);
     }
 }
开发者ID:inseo201,项目名称:atletik4,代码行数:39,代码来源:ContestsController.php

示例14: validation

 public function validation($code)
 {
     $now = new DateTime();
     $now->setTimezone(new DateTimeZone('America/Chicago'));
     $discount = Discount::where('name', '=', $code)->First();
     if (!$discount) {
         //retrived data save from API - See API documentation
         $data = array('success' => false, 'error' => "Discount code not available.");
         return $data;
     } else {
         $used = $discount->limit - count(Payment::where('promo', '=', $code)->get());
         if ($discount->start <= $now->format('Y-m-d') && $discount->end >= $now->format('Y-m-d') && $used > 0) {
             //allow only one discount at a single time
             Session::forget('discount');
             Session::flash('discount', array('percent' => $discount->percent, 'id' => $discount->id));
             //retrived data save from API - See API documentation
             $data = array('success' => true, 'now' => $now->format('Y-m-d'), 'start' => $discount->start, 'end' => $discount->end);
             return $data;
         } else {
             $data = array('success' => false, 'error' => "Discount code not active or past validation day");
             return $data;
         }
     }
 }
开发者ID:illuminate3,项目名称:league-production,代码行数:24,代码来源:Discount.php

示例15: add_request

 public function add_request()
 {
     Log::info('add request from admin panel.');
     $owner_id = Request::segment(3);
     $owner = Owner::find($owner_id);
     $services = ProviderType::where('is_visible', '=', 1)->get();
     $total_services = ProviderType::where('is_visible', '=', 1)->count();
     // Payment options allowed
     $payment_options = array();
     $payments = Payment::where('owner_id', $owner_id)->count();
     if ($payments) {
         $payment_options['stored_cards'] = 1;
     } else {
         $payment_options['stored_cards'] = 0;
     }
     $codsett = Settings::where('key', 'cod')->first();
     if ($codsett->value == 1) {
         $payment_options['cod'] = 1;
     } else {
         $payment_options['cod'] = 0;
     }
     $paypalsett = Settings::where('key', 'paypal')->first();
     if ($paypalsett->value == 1) {
         $payment_options['paypal'] = 1;
     } else {
         $payment_options['paypal'] = 0;
     }
     Log::info('payment_options = ' . print_r($payment_options, true));
     // Promo code allowed
     $promosett = Settings::where('key', 'promo_code')->first();
     if ($promosett->value == 1) {
         $promo_allow = 1;
     } else {
         $promo_allow = 0;
     }
     $settdestination = Settings::where('key', 'get_destination')->first();
     $settdestination = $settdestination->value;
     $title = ucwords("Add" . trans('customize.Request'));
     /* 'Add Request' */
     return View::make('add_request')->with('owner', $owner)->with('services', $services)->with('total_services', $total_services)->with('payment_option', $payment_options)->with('settdestination', $settdestination)->with('title', $title)->with('page', 'walks');
 }
开发者ID:felipemarques8,项目名称:goentregas,代码行数:41,代码来源:AdminController.php


注:本文中的Payment::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。