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


PHP Customer::all方法代码示例

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


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

示例1: store

 public function store(ItemRequest $request)
 {
     try {
         $customers = Customer::all();
         Item::create($request->all());
         $item = Item::orderBy('created_at', 'desc')->first();
         foreach ($customers as $customer) {
             Price::create(['item_id' => $item->id, 'customer_id' => $customer->id, 'custom_price' => $item->price, 'sellable' => '1', 'is_custom' => '0']);
         }
         return redirect('item')->with('message', 'Data berhasil dibuat!');
     } catch (\Illuminate\Database\QueryException $e) {
         return redirect('item')->with('message', 'Data dengan nama tersebut sudah digunakan!');
     } catch (\PDOException $e) {
         return redirect('item')->with('message', 'Data dengan nama tersebut sudah digunakan!');
     }
 }
开发者ID:Herlanggaws,项目名称:givani,代码行数:16,代码来源:ItemsController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $customer = Customer::all();
     // dd($customer);
     return View('customer.index')->with('customer', $customer);
 }
开发者ID:keylukman,项目名称:latihan_aja_ya,代码行数:12,代码来源:CustomerController.php

示例3: xlsFileCustomer

 public function xlsFileCustomer()
 {
     $namefile = date('Yh:i:s') . "_Customer";
     Excel::create($namefile, function ($excel) {
         // Set the title
         $excel->setTitle('NMK Customer Form');
         // Chain the setters
         $excel->setCreator('NMK Application')->setCompany('NMK');
         // Call them separately
         $excel->setDescription('This files has all lead form record');
         $excel->sheet('Excel sheet', function ($sheet) {
             $roadshows = Customer::all();
             $sheet->setStyle(array('font' => array('name' => 'Calibri', 'size' => 13)));
             $sheet->row(1, array('Company', 'Contact Person', 'Telephone', 'Mobile', 'Address', 'P.O. Box', 'City', 'Delivery Address', 'Email'));
             foreach ($roadshows as $key => $value) {
                 $sheet->row(1, function ($row) {
                     // call cell manipulation methods
                     $row->setBackground('#888888');
                     $row->setFont(array('family' => 'Calibri', 'size' => '16', 'bold' => true));
                 });
                 $sheet->rows(array(array($value->company, $value->person, $value->telephone, $value->mobile, $value->address, $value->pobox, $value->city, $value->deliveryAddress, $value->email)));
             }
             //$sheet->fromModel($roles);
             // $sheet->fromArray(array(
             //     array('Name', 'Phone','Email','Job Title','Company','Intrested Brand','Intrested Seminiar'),
             //     $leads
             // ));
             $sheet->setOrientation('landscape');
         });
     })->export('xls');
 }
开发者ID:hafizzain,项目名称:nmk-admin,代码行数:31,代码来源:CustomerController.php

示例4: create

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $customers = Customer::all();
     //     	return view('order.create',compact('customers', $customers));
     return view('order.create', array('customers' => $customers));
     //         return view('order.create');
 }
开发者ID:owlein,项目名称:laundrymgt,代码行数:12,代码来源:OrderController.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idkas)
 {
     $kas = Kas::find($idkas);
     $cust = Customer::all();
     $data = array('kas' => $kas, 'cust' => $cust);
     return View('kas.edit')->with('data', $data);
 }
开发者ID:keylukman,项目名称:latihan_aja_ya,代码行数:13,代码来源:KasController.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idpic)
 {
     $pic = Pic::find($idpic);
     $cust = Customer::all();
     $data = array('pic' => $pic, 'cust' => $cust);
     return View('pic.edit')->with('data', $data);
 }
开发者ID:keylukman,项目名称:latihan_aja_ya,代码行数:13,代码来源:PicController.php

示例7: create

 public function create()
 {
     $input = Input::all();
     $customers = Customer::all();
     $salesmen = Employee::all();
     return view('return.create', compact('input', 'customers', 'salesmen'));
 }
开发者ID:MangTomas23,项目名称:tgm,代码行数:7,代码来源:ReturnController.php

示例8: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idms)
 {
     $ms = Ms::find($idms);
     $cust = Customer::all();
     $data = array('ms' => $ms, 'cust' => $cust);
     return View('ms.edit')->with('data', $data);
     //
 }
开发者ID:keylukman,项目名称:latihan_aja_ya,代码行数:14,代码来源:MsController.php

示例9: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $customers = Customer::all();
     foreach ($customers as $customer) {
         $customer->old_password = $customer->password;
         $customer->save();
     }
 }
开发者ID:manogi,项目名称:gfw-qm,代码行数:13,代码来源:StoreOldPasswords.php

示例10: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($idtr)
 {
     $tr = Tr::find($idtr);
     $cust = Customer::all();
     $data = array('tr' => $tr, 'cust' => $cust);
     return View('tr.edit')->with('data', $data);
     //
 }
开发者ID:keylukman,项目名称:latihan_aja_ya,代码行数:14,代码来源:TrController.php

示例11: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $estimates = Estimate::orderBy('id', 'DESC')->get();
     $customers = Customer::all();
     $vehicles = Vehicle::all();
     $departments = Department::all();
     $users = User::all();
     return view('estimates.estimates', compact('estimates', 'customers', 'vehicles', 'departments', 'users'));
 }
开发者ID:suxiid,项目名称:application,代码行数:14,代码来源:EstimatesController.php

示例12: search

 public function search()
 {
     $products = Product::all();
     $doctors = Customer::all();
     $MRs = Employee::where('level_id', 7)->get();
     $AMs = Employee::where('level_id', 3)->get();
     $SMs = Employee::where('level_id', 2)->get();
     $dataView = ['products' => $products, 'doctors' => $doctors, 'MRs' => $MRs, 'AMs' => $AMs, 'SMs' => $SMs];
     return view('admin.search.sales.search', $dataView);
 }
开发者ID:m-gamal,项目名称:crm,代码行数:10,代码来源:SaleController.php

示例13: index

 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $provisioning = Provisioning::all();
     $customers = Customer::all();
     $onts = Ont::all();
     $accessSwitches = AccessSwitch::all();
     $dhcpSharedNetworks = DhcpSharedNetwork::all();
     $ipaddresses = Ipaddress::all();
     $ports = AccessSwitchPort::all();
     return view('home')->with('provisioning', $provisioning)->with('customers', $customers)->with('onts', $onts)->with('accessSwitches', $accessSwitches)->with('ports', $ports)->with('ipaddresses', $ipaddresses)->with('DhcpSharedNetworks', $dhcpSharedNetworks);
 }
开发者ID:goatatwork,项目名称:access2,代码行数:16,代码来源:HomeController.php

示例14: create

 public function create()
 {
     $customers = Customer::all();
     $coffee1 = DB::table('coffees')->where('id', 2)->first();
     $coffee2 = DB::table('coffees')->where('id', 3)->first();
     $coffee3 = DB::table('coffees')->where('id', 4)->first();
     $coffee4 = DB::table('coffees')->where('id', 5)->first();
     $coffee5 = DB::table('coffees')->where('id', 6)->first();
     $pastry1 = DB::table('pastries')->where('id', 7)->first();
     $pastry2 = DB::table('pastries')->where('id', 10)->first();
     $pastry3 = DB::table('pastries')->where('id', 11)->first();
     $pastry4 = DB::table('pastries')->where('id', 12)->first();
     $pastry5 = DB::table('pastries')->where('id', 15)->first();
     return view('order.create', compact('customers', 'coffee1', 'coffee2', 'coffee3', 'coffee4', 'coffee5', 'pastry1', 'pastry2', 'pastry3', 'pastry4', 'pastry5'));
 }
开发者ID:jakzaizzat,项目名称:KopiBean,代码行数:15,代码来源:.OrdersController.php

示例15: index

 /**
  * Show the application welcome screen to the user.
  *
  * @return Response
  */
 public function index(request $request)
 {
     if ($request->input('st')) {
         $site_id = $request->input('st');
         $state_id = DB::table('site_details')->where('id', '=', $site_id)->pluck('state_id');
         if ($state_id) {
             $parameters = DB::table('parameters')->join('tests', 'tests.parameter_id', '=', 'parameters.id')->where('tests.state_id', '=', $state_id)->orderBy('parameters.name')->get();
         }
     } else {
         $state_id = "";
         $parameters = DB::table('parameters')->orderBy('parameters.name')->get();
     }
     $users = DB::table('users')->where('role_id', '=', 3)->select('id', 'name', 'email')->get();
     $customers = Customer::all();
     $orders = Order::where('customer_id', '=', 14)->get();
     return view('order/index')->with(compact('parameters', 'users', 'orders', 'customers', 'state_id'));
 }
开发者ID:ramant15,项目名称:ektimo,代码行数:22,代码来源:OrderController.php


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