当前位置: 首页>>代码示例>>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;未经允许,请勿转载。