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


PHP Client::all方法代码示例

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


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

示例1: edit

 public function edit($id)
 {
     $access = Access::findOrFail($id);
     $client = Client::all()->lists('name', 'id');
     $selected = array();
     return view('access.edit', compact('access', 'client', 'selected'));
 }
开发者ID:jdiaz1989,项目名称:intranet,代码行数:7,代码来源:AccessController.php

示例2: index

 /**
  * Show the application dashboard.
  *
  * @return Response
  */
 public function index()
 {
     $clients = Client::all();
     $projects = Project::all();
     $notes = ClientNote::all();
     return view('home')->with('clientCount', count($clients))->with('projectCount', count($projects))->with('noteCount', count($notes));
 }
开发者ID:goatatwork,项目名称:goatshark,代码行数:12,代码来源:HomeController.php

示例3: index

 public function index()
 {
     if (Auth::user()['role'] == 'Accounting' or Auth::user()['role'] == 'General Manager') {
         $clients = Client::all();
         $overdue = new SalesInvoice();
         $delivered = new SalesInvoice();
         $check = new SalesInvoice();
         $salesinvoice = new SalesInvoice();
         $salesinvoice2 = new SalesInvoice();
         $salesinvoice3 = new SalesInvoice();
         $salesinvoiceTotal;
         foreach ($clients as $client) {
             $overdue[$client->id] = SalesInvoice::where('client_id', $client->id)->where('status', 'Overdue')->count();
             $delivered[$client->id] = SalesInvoice::where('client_id', $client->id)->where('status', 'Delivered')->count();
             $check[$client->id] = SalesInvoice::where('client_id', $client->id)->where('status', 'Check on Hand')->count();
             // $salesinvoice[$client->id] = DB::SELECT("SELECT sum(total_amount) as total FROM sales_invoices
             //                        WHERE (status = 'Overdue' or  status = 'Delivered') and client_id = '$client->id'");
             $salesinvoice = SalesInvoice::where('status', '=', 'Overdue')->where('client_id', '=', $client->id)->sum('total_amount');
             $salesinvoice2 = SalesInvoice::where('status', 'Delivered')->where('client_id', $client->id)->sum('total_amount');
             $salesinvoice3 = SalesInvoice::where('status', 'Check on Hand')->where('client_id', $client->id)->sum('total_amount');
             $salesinvoiceTotal[$client->id] = $salesinvoice + $salesinvoice2 + $salesinvoice3;
             //$salesinvoice[$client->id] = SalesInvoice::where('status = Overdue or status = Delivered and client_id = '.$client->id.'')->sum('total_amount');
         }
         // for ($x = 1; $x < count($clients)+1; $x++)
         // {
         //    $overdue[$x] = SalesInvoice::where('client_id', $x)->where('status', 'Overdue')->count();
         //    $delivered[$x] = SalesInvoice::where('client_id', $x)->where('status', 'Delivered')->count();
         //    $pending[$x] = SalesInvoice::where('client_id', $x)->where('status', 'Pending')->count();
         // }
         return view('collectibles.index', compact('clients', 'overdue', 'delivered', 'check', 'salesinvoiceTotal'));
     }
 }
开发者ID:jacqhernandez,项目名称:hsms,代码行数:32,代码来源:CollectiblesController.php

示例4: destroy

 public function destroy($id)
 {
     $client = Client::find($id);
     $client->delete();
     $clients = Client::all();
     return view('client.list')->with(['success' => 'Cliente excluído com sucesso!', 'clients' => $clients]);
 }
开发者ID:Bryzola,项目名称:hiring,代码行数:7,代码来源:ClientController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     if (Gate::denies('viewClients', new Client())) {
         abort(403, 'Not allowed');
     }
     $clients = Client::all();
     return View::make('client.index')->with('clients', $clients);
 }
开发者ID:shirishmore,项目名称:timesheet,代码行数:13,代码来源:ClientController.php

示例6: index

 public function index(Request $request)
 {
     if ($request->ajax()) {
         $handler = Input::get('handler');
         if ($handler == 0) {
             $clients = Client::all();
         } elseif ($handler == 1) {
             $clients = Client::where('active', true)->get();
         } else {
             $clients = Client::where('active', false)->get();
         }
         return view('clients.table', ['clients' => $clients]);
     } else {
         $clients = Client::all();
         return view('clients.index', ['clients' => $clients]);
     }
 }
开发者ID:PixelPartyRu,项目名称:erp,代码行数:17,代码来源:ClientController.php

示例7: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Request $request, $project_id = null)
 {
     if ($project_id != null) {
         $project = Project::find($project_id);
         // Get all clients for dropdown
         $clients = Client::all();
     } else {
         $this->sys_notifications[] = array('type' => 'danger', 'message' => '<i class="fa fa-warning"></i> Projeto não informado!');
         $request->session()->flash('sys_notifications', $this->sys_notifications);
         return back()->withInput($request->all());
     }
     if ($request->ajax()) {
         return view('project_stages.create-modal', compact('project', $project));
     } else {
         return view('project_stages.create', compact('project', $project));
     }
 }
开发者ID:system3d,项目名称:consultas-tecnicas,代码行数:22,代码来源:ProjectStageController.php

示例8: index

 public function index(Request $request)
 {
     $sort = Input::get('sort') == null ? 'relation_id' : Input::get('sort');
     $client_id_select = Input::get('client_id_select') == null ? 'all' : Input::get('client_id_select');
     $countCongestion = Input::get('count_congestion') == null ? 'balance_owed' : Input::get('count_congestion');
     $sortDirection = Input::get('sortDirection') == null ? 'DESC' : Input::get('sortDirection');
     $clients = Client::all();
     $debtors = Debtor::all();
     $limits = Limit::whereHas('relation', function ($query) use($client_id_select) {
         if ($client_id_select !== 'all') {
             $query->where('client_id', '=', $client_id_select);
         }
     })->get();
     $usedLimit = array();
     foreach ($limits as $key => $limit) {
         $usedLimitItem = 0;
         foreach ($limit->relation->deliveries as $value) {
             if ($value->status == 'Профинансирована') {
                 if ($countCongestion == 'remainder_of_the_debt_first_payment') {
                     $usedLimitItem += $value->remainder_of_the_debt_first_payment;
                 } else {
                     $usedLimitItem += $value->balance_owed;
                 }
             }
         }
         $usedLimit[$key] = $usedLimitItem;
     }
     $relations = Relation::select('client_id')->distinct()->get();
     if ($request->ajax()) {
         if ($sort == 'client_id') {
             return view('limits.indexAjaxClient', ['clients' => $clients, 'countCongestion' => $countCongestion]);
         } else {
             if ($sort == 'debtor_id') {
                 return view('limits.indexAjaxDebtor', ['countCongestion' => $countCongestion, 'debtors' => $debtors]);
             } else {
                 return view('limits.indexAjax', ['limits' => $limits, 'relations' => $relations, 'usedLimit' => $usedLimit]);
             }
         }
     } else {
         return view('limits.index', ['limits' => $limits, 'relations' => $relations, 'usedLimit' => $usedLimit, 'clients' => $clients]);
     }
 }
开发者ID:PixelPartyRu,项目名称:erp,代码行数:42,代码来源:LimitController.php

示例9: client

 /**
  * Display a list of Client's name
  * @return static
  */
 public function client()
 {
     return Client::all()->lists('name', 'name')->sort();
 }
开发者ID:smartrahat,项目名称:zamzam,代码行数:8,代码来源:InvoiceRepository.php

示例10: index

 public function index()
 {
     $clients = Client::all();
     $leftmenu['client'] = 'active';
     return view('/clients/clients', ['clients' => $clients, 'leftmenu' => $leftmenu]);
 }
开发者ID:ninir007,项目名称:Ats,代码行数:6,代码来源:ClientsController.php

示例11: show

 /**
  * Display the specified resource.
  * Last updated by smartrahat Date: 29.11.2015 Time: 05:51PM
  * @param  int  $id
  * @return Response
  */
 public function show($id)
 {
     $title = 'SHOW VEHICLE';
     $vehicle = Vehicles::findOrFail($id);
     $client = Client::all()->where('id', $vehicle->cid)->sortByDesc('updated_at')->first();
     $driver = Employee::all()->where('id', $vehicle->eid)->sortByDesc('updated_at')->first();
     $fitness = Log::all()->where('action', 'Fitness Check')->where('bid', $vehicle->id)->last();
     $police = Log::all()->where('action', 'Police Case')->where('bid', $vehicle->id)->sortByDesc('updated_at')->count();
     $accident = Log::all()->where('action', 'Accident')->where('bid', $vehicle->id)->sortByDesc('updated_at')->count();
     //dd($accident);
     $repository = $this->repository;
     return view('vehicle.show', compact('title', 'vehicle', 'driver', 'client', 'status', 'repository', 'fitness', 'police', 'accident'));
 }
开发者ID:smartrahat,项目名称:zamzam,代码行数:19,代码来源:VehicleController.php

示例12: getRegistrar

 public function getRegistrar()
 {
     $clientes = Client::all();
     return view('cliente.clientes', ['clientes' => $clientes]);
 }
开发者ID:JCarlosR,项目名称:Mantenedores,代码行数:5,代码来源:ClientController.php

示例13: seed

 public function seed(Request $request)
 {
     if ($request->ajax()) {
         if ($request->q) {
             $clients = Client::where('firm_name', 'LIKE', '%' . $request->q . '%')->orwhere('last_name', 'LIKE', '%' . $request->q . '%')->get();
         } else {
             $clients = Client::all();
         }
         $list = array();
         foreach ($clients as $key => $value) {
             $list[$key]['id'] = $value->id;
             $list[$key]['text'] = '#' . $value->id . ' ' . $value->last_name . ' -  ' . strtoupper($value->firm_name);
         }
         return $list;
     }
     // return Client::select('id',  \DB::raw('CONCAT(firm_name, " ", first_name, " ", last_name) as full_name'))->pluck('full_name', 'id');
 }
开发者ID:thibaultvanc,项目名称:organit,代码行数:17,代码来源:ClientController.php

示例14: index

 public function index()
 {
     // \Auth::user()->name; //get name of Auth user
     $clients = Client::all();
     return view('clients.index', compact('clients', 'client'));
 }
开发者ID:patrykszady,项目名称:gstest,代码行数:6,代码来源:ClientsController.php

示例15: index

 /**
  * Display a listing of the resource.Andrei111111
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $clients = Client::all();
     return view('clients.index', ['clients' => $clients, 'count' => Client::count()]);
 }
开发者ID:redcatthethird,项目名称:garage-manager,代码行数:10,代码来源:ClientsController.php


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