本文整理汇总了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]);
}
示例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;*/
}
示例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));
}
示例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');
}
示例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);
}
}
示例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);
}
示例7: getAll
public function getAll()
{
return Customer::all();
}
示例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);
}
示例9: index
public function index()
{
//Log::info("Entered 'CustomerController@index");
$customers = Customer::all();
return View::make('customers.index', array('customers' => $customers));
}
示例10: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
$customers = Customer::all();
return View::make('customer.customer', ['customers' => $customers]);
}
示例11: getViewCustomer
public function getViewCustomer()
{
$customer = Customer::all();
return View::make('customer.view-customer', array('customers' => $customer));
}
示例12: allCustomers
public function allCustomers()
{
$customers = Customer::all()->toArray();
var_dump($customers);
}
示例13: getCustomerList
public function getCustomerList()
{
$companies = Customer::all();
return View::make('activities.customer-list', array('company' => $companies));
}
示例14: getAddContact
public function getAddContact()
{
$companies = Customer::all();
return View::make('contacts.add-contacts', array('company' => $companies));
}
示例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();
}