/** * 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]); }
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;*/ }
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)); }
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'); }
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); } }
/** * 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); }
public function getAll() { return Customer::all(); }
public function index() { $orders = Order::all(); $customers = Customer::all(); return View::make('reports.index')->with('page_title', 'Reports')->with('orders', $orders)->with('customers', $customers); }
public function index() { //Log::info("Entered 'CustomerController@index"); $customers = Customer::all(); return View::make('customers.index', array('customers' => $customers)); }
/** * Display a listing of the resource. * * @return Response */ public function index() { // $customers = Customer::all(); return View::make('customer.customer', ['customers' => $customers]); }
public function getViewCustomer() { $customer = Customer::all(); return View::make('customer.view-customer', array('customers' => $customer)); }
public function allCustomers() { $customers = Customer::all()->toArray(); var_dump($customers); }
public function getCustomerList() { $companies = Customer::all(); return View::make('activities.customer-list', array('company' => $companies)); }
public function getAddContact() { $companies = Customer::all(); return View::make('contacts.add-contacts', array('company' => $companies)); }
/** * 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(); }
/** * Display a listing of customers * * @return Response */ public function index() { $customers = Customer::all(); return View::make('admin.customers.index', compact('customers')); }
public function testAll() { $customers = Customer::all(array('limit' => 3, 'offset' => 10)); }