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


PHP Customer::all方法代码示例

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


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

示例1: create

 /**
  * O método precisa informar uma lista de produtos
  * @return {view}
  */
 public function create()
 {
     $stocks = Stock::all();
     $customers = Customer::all();
     $employees = Employee::all();
     return view('pages.new_sale', ['stocks' => $stocks, 'customers' => $customers, 'employees' => $employees]);
 }
开发者ID:bsampaio,项目名称:LumenExperience,代码行数:11,代码来源:SaleController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //Cache::pull('customer');
     $customers = Cache::get('customer', function () {
         $customer = Customer::all();
         Cache::forever('customer', $customer);
         return $customer;
     });
     //        print_r($customers);
     //        die;
     return view('customer.main', ['theme' => 'default', 'customer' => $customers]);
 }
开发者ID:kunta0514,项目名称:laravel,代码行数:17,代码来源:CustomerController.php

示例3: save

 public function save(Request $request)
 {
     $customer = Customer::create($request->all());
     $customers = Customer::all();
     return view('pages.customers', ['customers' => $customers]);
 }
开发者ID:bsampaio,项目名称:LumenExperience,代码行数:6,代码来源:CustomerController.php

示例4: showAll

 public function showAll()
 {
     $customers = Customer::all();
     return view('customer_all', ['customers' => $customers->getArray()]);
 }
开发者ID:JSHOCKEY,项目名称:rockit_posCrud,代码行数:5,代码来源:CustomerController.php

示例5: listIDAndDesignGroupedByCustomer

 /**
  * Static function that returns the list of ids and designs grouped by customer
  * @return mixed
  */
 public static function listIDAndDesignGroupedByCustomer()
 {
     foreach (Customer::all() as $customer) {
         if (isset($customer->jobCostings) && $customer->jobCostings->count() > 0) {
             $list[$customer->customer_company_name] = $customer->jobCostings->pluck('jc_design_name', 'job_costing_id');
         }
     }
     $list = collect($list);
     return $list;
 }
开发者ID:buys-fran,项目名称:mtech-mis,代码行数:14,代码来源:JobCosting.php

示例6: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return Customer::all();
 }
开发者ID:oarGroupeCesi,项目名称:madera_api,代码行数:9,代码来源:CustomerController.php

示例7: create

 /**
  * Return a view with all the MOQ and relevant JobCosting
  *
  * @return $this
  */
 public function create()
 {
     $this->authorize('edit_job_costings');
     return view('jobcostings.create')->with(['jobcosting' => new JobCosting(), 'customers' => Customer::all()->sortBy('customer_company_name')]);
 }
开发者ID:buys-fran,项目名称:mtech-mis,代码行数:10,代码来源:JobCostingsController.php

示例8: index

 /**
  * Display a listing of the resource.
  * @return Response
  */
 public function index()
 {
     $customers = Customer::all();
     return view('customers.index', compact('customers'));
 }
开发者ID:igormoura,项目名称:ecclesia,代码行数:9,代码来源:CustomerController.php


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