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


PHP Customer::all方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $project = Project::find($id);
     $categories = Category::all()->lists('name', 'id');
     $customers = Customer::all()->lists('name', 'id');
     return View::make('admin.projects.edit')->with(['project' => $project, 'categories' => $categories, 'customers' => $customers]);
 }
开发者ID:TheFormula,项目名称:westmoreland.dev,代码行数:13,代码来源:ProjectsController.php

示例2: ajaxCustomers

 public function ajaxCustomers()
 {
     $cpage = 'customers';
     $i = Input::all();
     $arr = [];
     $arr = getallheaders();
     $count = Customer::all()->count();
     if (isset($arr['Range'])) {
         $response_array = array();
         $response_array['Accept-Ranges'] = 'items';
         $response_array['Range-Unit'] = 'items';
         $response_array['Content-Ranges'] = 'items ' . $arr['Range'] . '/' . $count;
         $arr = explode('-', $arr['Range']);
         $items = $arr[1] - $arr[0] + 1;
         $skip = $arr[0];
         $skip = $skip < 0 ? 0 : $skip;
         $c = null;
         if (isset($_GET['query']) && $_GET['query'] != '') {
             $query = $_GET['query'];
             $c = Customer::where('membership_id', 'LIKE', "%{$query}%")->orWhereRaw("concat_ws(' ',firstname,lastname) LIKE '%{$query}%'")->orWhere('firstname', 'LIKE', "%{$query}")->orWhere('lastname', 'LIKE', "%{$query}%")->skip($skip)->take($items)->get();
         } else {
             $c = Customer::skip($skip)->take($items)->get();
         }
         $response = Response::make($c, 200);
         $response->header('Content-Range', $response_array['Content-Ranges'])->header('Accept-Ranges', 'items')->header('Range-Unit', 'items')->header('Total-Items', $count)->header('Flash-Message', 'Now showing pages ' . $arr[0] . '-' . $arr[1] . ' out of ' . $count);
         return $response;
     }
     $c = Customer::all();
     $response = Response::make($c, 200);
     $response->header('Content-Ranges', 'test');
     return $response;
     /*	$c = Customer::all();
     	return $c;*/
 }
开发者ID:jonathanespanol,项目名称:FiligansHotelReservation,代码行数:34,代码来源:CustomersController.php

示例3: getAdminDashboard

 public function getAdminDashboard()
 {
     $customerCount = Customer::count('c_id');
     $contactsCount = Contact::count('contact_id');
     $totalActi = Activity::count('activity_id');
     $comp = Customer::all()->take(5);
     return View::make('dashboard', array('customers' => $customerCount, 'contactCount' => $contactsCount, 'activity' => $totalActi, 'company' => $comp));
 }
开发者ID:nimeshmora,项目名称:CRM-DMA-Recruitment,代码行数:8,代码来源:DashboardController.php

示例4: index

 public function index()
 {
     $user = new Customer($this->db);
     $this->f3->set('users', $user->all());
     $this->f3->set('page_head', 'Cusotmer List');
     $this->f3->set('view', 'customer/list.htm');
     $_SESSION["id"] = "sriuthgsilgdfisgnaweoir239-57ef";
     echo Template::instance()->render('layout.htm');
 }
开发者ID:srccn,项目名称:f3,代码行数:9,代码来源:CustomerController.php

示例5: adminListCustomers

 public function adminListCustomers()
 {
     Larasset::start('footer')->js('dataTables-min', 'dataTables-bootstrap');
     $allcustomers = Customer::all();
     $data['customers'] = $allcustomers->toArray();
     if (Request::ajax()) {
         return View::make('admin.listcustomers', $data);
     } else {
         $this->layout->title = 'Create, Edit, Delete Staff';
         $this->layout->content = View::make('admin.tab_customermenus', $data);
     }
 }
开发者ID:sliekasirdis79,项目名称:POS,代码行数:12,代码来源:CustomerController.php

示例6: index

 /**
  * Display a listing of the resource.
  * GET /sales
  *
  * @return Response
  */
 public function index()
 {
     // return Session::forget('trans_id');
     //generate the transaction id
     // return Session::forget('trans_id');
     if (!Session::has('trans_id') && $this->isCartEmpty()) {
         $trans_id = $this->initTransaction();
         Session::put("trans_id", $trans_id);
     } else {
         if (!$this->isCartEmpty()) {
             //get the existing transaction id on the cart
             $temp = $this->temp->all()->first();
             $trans_id = $temp->trans_id;
             Session::put('trans_id', $trans_id);
         }
     }
     //show the sales-register
     $customers = Customer::all();
     return View::make('registrar.index')->with('title', 'Sales Register')->with('customers', $customers);
 }
开发者ID:fagray,项目名称:fposs,代码行数:26,代码来源:SalesController.php

示例7: getAll

 public function getAll()
 {
     return Customer::all();
 }
开发者ID:berzeek,项目名称:realdash,代码行数:4,代码来源:ClientController.php

示例8: index

 public function index()
 {
     $orders = Order::all();
     $customers = Customer::all();
     return View::make('reports.index')->with('page_title', 'Reports')->with('orders', $orders)->with('customers', $customers);
 }
开发者ID:janputzan,项目名称:customer_db,代码行数:6,代码来源:ReportController.php

示例9: index

 public function index()
 {
     //Log::info("Entered 'CustomerController@index");
     $customers = Customer::all();
     return View::make('customers.index', array('customers' => $customers));
 }
开发者ID:UniquelySimilar,项目名称:order_mgmt_laravel,代码行数:6,代码来源:CustomerController.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $customers = Customer::all();
     return View::make('customer.customer', ['customers' => $customers]);
 }
开发者ID:NathanaelFebrianto,项目名称:Citramas,代码行数:11,代码来源:CustomerController.php

示例11: getViewCustomer

 public function getViewCustomer()
 {
     $customer = Customer::all();
     return View::make('customer.view-customer', array('customers' => $customer));
 }
开发者ID:nimeshmora,项目名称:CRM-DMA-Recruitment,代码行数:5,代码来源:CustomerController.php

示例12: allCustomers

 public function allCustomers()
 {
     $customers = Customer::all()->toArray();
     var_dump($customers);
 }
开发者ID:nangei,项目名称:wpa8pos,代码行数:5,代码来源:CustomerController.php

示例13: getCustomerList

 public function getCustomerList()
 {
     $companies = Customer::all();
     return View::make('activities.customer-list', array('company' => $companies));
 }
开发者ID:nimeshmora,项目名称:CRM-DMA-Recruitment,代码行数:5,代码来源:ActivityController.php

示例14: getAddContact

 public function getAddContact()
 {
     $companies = Customer::all();
     return View::make('contacts.add-contacts', array('company' => $companies));
 }
开发者ID:nimeshmora,项目名称:CRM-DMA-Recruitment,代码行数:5,代码来源:ContactsController.php

示例15: getDatatableCustomers

 /**
  * getDatatableCustomers
  */
 public function getDatatableCustomers()
 {
     $collection = Customer::all();
     return Datatable::collection($collection)->showColumns('name', 'mobile', 'address')->searchColumns('name', 'mobile', 'wechat')->addColumn('actions', function ($model) {
         return $str = '<button data-customerid="' . $model->id . '"  class="btn btn-info btn_cart">查看购物车</button>';
     })->make();
 }
开发者ID:yanguanglan,项目名称:sz,代码行数:10,代码来源:CartsController.php


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