當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Client::lists方法代碼示例

本文整理匯總了PHP中app\Client::lists方法的典型用法代碼示例。如果您正苦於以下問題:PHP Client::lists方法的具體用法?PHP Client::lists怎麽用?PHP Client::lists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Client的用法示例。


在下文中一共展示了Client::lists方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     if (Gate::denies('addClient', new Client())) {
         abort(403, 'You are now allowed here');
     }
     $client = Client::lists('name', 'id');
     return view('project.create')->with('client', $client);
 }
開發者ID:komalsavla10,項目名稱:timesheet,代碼行數:13,代碼來源:ProjectController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  *
  * @return Response
  */
 public function edit($id)
 {
     $facture = Facture::findOrFail($id);
     /*Lists*/
     $projects = Project::lists('name', 'id');
     $selectedProjects = $facture->projects->lists('id')->flatten()->all();
     $contacts = Contact::select('id', DB::raw('CONCAT(first_name, " ", last_name) as full_name'))->orderBy('last_name', 'asc')->lists('full_name', 'id');
     $clients = Client::lists('email', 'id');
     //dd($selectedProjects);
     return view('admin.facture.edit', compact('facture', 'projects', 'selectedProjects', 'contacts', 'clients'));
 }
開發者ID:thibaultvanc,項目名稱:organit,代碼行數:18,代碼來源:FactureController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $reportOptions = [];
     $reportOptions['sales'] = 'Sales';
     $reportOptions['collection'] = 'Collection';
     $reportOptions['item'] = 'Item';
     $reportOptions['client'] = 'Client';
     $clients = Client::lists('name', 'id');
     $items = Item::lists('name', 'id');
     //$yearOptions = [];
     //$counter = 0;
     //$years = DB::select("SELECT YEAR(date) AS 'year' FROM sales_invoices")->get();
     $years = DB::table('sales_invoices')->select(db::raw('YEAR(date) as yearDate'))->lists('yearDate', 'yearDate');
     //$years = Salesinvoice::lists('date');
     return view('reports.index', compact('reportOptions', 'clients', 'items', 'years'));
     //return $years;
 }
開發者ID:jacqhernandez,項目名稱:hsms,代碼行數:23,代碼來源:ReportsController.php

示例4: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $clients = Client::lists('name', 'id');
     return view('testView', compact('clients'));
 }
開發者ID:arianpour,項目名稱:AgentProV0.2,代碼行數:10,代碼來源:testController.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  Project  $project
  * @return Response
  */
 public function edit(Project $project)
 {
     $clients = Client::lists('name', 'id');
     return view('projects.edit', compact('clients', 'project'));
 }
開發者ID:kodefly,項目名稱:kode-agile,代碼行數:11,代碼來源:ProjectsController.php

示例6: edit

 public function edit(Client $client)
 {
     $clients = Client::lists('first_name', 'id');
     return view('clients.edit', compact('client', 'clients'));
 }
開發者ID:patrykszady,項目名稱:gstest,代碼行數:5,代碼來源:ClientsController.php


注:本文中的app\Client::lists方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。