當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。