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


PHP customer::find方法代码示例

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


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

示例1: gymaccess_update

 public function gymaccess_update(Request $request)
 {
     $customer = customer::find($request->id);
     $customer->gymaccess_ind = 1;
     $customer->save();
     $gymaccess = new gymaccess();
     $gymaccess->customer_id = $request->id;
     $gymaccess->activation_date = Carbon::today();
     $rate_id = $request->gymaccess;
     $rate = Rate::where('id', '=', $rate_id)->firstOrFail();
     /*$price = number_format( $rate->price, 2);*/
     if ($rate->period == 'day') {
         $gymaccess->expiration_date = Carbon::today()->addDays($rate->period_count);
     } else {
         if ($rate->period == 'month') {
             $gymaccess->expiration_date = Carbon::today()->addMonths($rate->period_count)->subDay();
         } else {
             if ($rate->period == 'year') {
                 $gymaccess->expiration_date = Carbon::today()->addYears($rate->period_count)->subDay();
             }
         }
     }
     $gymaccess->active_ind = 1;
     $gymaccess->save();
     return redirect('dashboard');
 }
开发者ID:sephestrito,项目名称:learning-laravel-5,代码行数:26,代码来源:CustomersController.php

示例2: get_id

 function get_id($id)
 {
     return customer::find($id);
 }
开发者ID:dieka2501,项目名称:jip,代码行数:4,代码来源:customer.php

示例3: sendCustomerEmail

 public function sendCustomerEmail()
 {
     ini_set('max_execution_time', 3600);
     if (is_null(Session::get('name'))) {
         return View::make('static.index');
     } else {
         $id = Session::get('customer_id');
         $customer = customer::find($id);
         $data = array('name' => $customer->email);
         Mail::send('emails.customer-register-mail', $data, function ($message) use($customer) {
             $message->to($customer->email, $customer->name)->subject('Welcome to ..');
         });
     }
     return View::make('authentication.customer-saved')->with('customer_email', $customer->email);
 }
开发者ID:ashutoshpandey,项目名称:dicom,代码行数:15,代码来源:AuthenticationController.php


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