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


PHP Project::lists方法代码示例

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


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

示例1: edit

 public function edit(Expense $expense)
 {
     $projects = Project::lists('project_name', 'id');
     //sends an array of  'first_name' => 'id'
     $subs = Sub::lists('company_name', 'id');
     return view('expenses.edit', compact('projects', 'subs', 'expense'));
 }
开发者ID:patrykszady,项目名称:gstest,代码行数:7,代码来源:PaymentsController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit(Employee $employee)
 {
     $title = "Edit: " . $employee->last_name . ', ' . $employee->first_name;
     $roles = \App\Role::lists('role', 'id');
     $projects = \App\Project::lists('name', 'id');
     return view('employees.edit', compact('employee', 'title', 'roles', 'projects'));
 }
开发者ID:gabrico92,项目名称:adc-app,代码行数:13,代码来源:EmployeesController.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Module $module)
 {
     //
     $projects_list = Project::lists('name', 'id');
     $parents_module_list = Module::lists('name', 'id');
     return view('modules.edit', compact('module', 'projects_list', 'parents_module_list'));
 }
开发者ID:AmilcarCondino,项目名称:circulo,代码行数:13,代码来源:ModulesController.php

示例4: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $task = Task::find($id);
     $projects = Project::lists('name', 'id');
     //
     return View::make('tasks.edit', compact('task', 'projects'));
 }
开发者ID:pagegwood,项目名称:timetracker,代码行数:13,代码来源:TasksController.php

示例5: getProjectList

 protected function getProjectList()
 {
     if (!isset(self::$projectList)) {
         self::$projectList = array_replace(['' => '--- Project ---'], Project::lists('name', 'id')->toArray());
     }
     return self::$projectList;
 }
开发者ID:NeoCortexBg,项目名称:laravel-todo,代码行数:7,代码来源:AbstractTodoFormBuilder.php

示例6: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $env = Environment::findOrFail($id);
     $projects = Project::lists('name', 'id')->prepend('');
     $servers = Server::lists('name', 'id')->prepend('');
     return view('environment.edit', ['target_env' => $env, 'projects' => $projects, 'servers' => $servers]);
 }
开发者ID:sean111,项目名称:phpdeploy,代码行数:13,代码来源:EnvironmentController.php

示例7: index

 /**
  * @return Response
  */
 public function index()
 {
     $tokens = Token::all();
     $projects = Project::lists('name', 'pid');
     $all_projects = Project::all();
     //Second variable created here to get around weird indexing needed for pivot table in $projects
     return view('tokens.index', compact('tokens', 'projects', 'all_projects'));
 }
开发者ID:roehlerw,项目名称:Kora3,代码行数:11,代码来源:TokenController.php

示例8: run

 public function run()
 {
     $faker = Faker::create();
     $users = User::lists('id');
     $projects = Project::lists('id');
     foreach (range(1, 50) as $index) {
         User::find($faker->randomElement($users))->subscriptions()->attach($faker->randomElement($projects));
     }
 }
开发者ID:AaronDhiman,项目名称:usc-todo,代码行数:9,代码来源:ProjectUserTableSeeder.php

示例9: run

 public function run()
 {
     $faker = Faker::create();
     $users = User::lists('id');
     $projects = Project::lists('id');
     foreach (range(1, 50) as $index) {
         Todo::create(['user_id' => $faker->randomElement($users), 'project_id' => $faker->randomElement($projects), 'name' => $faker->word, 'completed' => $faker->boolean(), 'urgent' => $faker->boolean(), 'description' => $faker->sentence()]);
     }
 }
开发者ID:AaronDhiman,项目名称:usc-todo,代码行数:9,代码来源:TodosTableSeeder.php

示例10: 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

示例11: create

 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $projects = Project::lists('project', 'id');
     //dd($projects);
     return view('users.create')->with('projects', $projects);
 }
开发者ID:santhoshjanan,项目名称:Testbed,代码行数:11,代码来源:UserController.php

示例12: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $team = Team::find($id);
     $projects = Project::lists('name', 'id');
     //
     return View::make('teams.edit', compact('team', 'projects'));
 }
开发者ID:pagegwood,项目名称:timetracker,代码行数:13,代码来源:TeamsController.php

示例13: managePeopleEdit

 /**
  * Display the view to edit an existing people.
  * @param People $people
  * @return \Illuminate\View\View
  */
 public function managePeopleEdit(People $people)
 {
     $type_list = Collection::make(['current_student' => "Current Student", 'past_student' => "Past Student", 'current_staff' => "Current Staff", 'past_staff' => "Past Staff", 'partner' => "Partner"]);
     $projects = Project::lists('name', 'id');
     return view('admin.people.edit', ['people' => $people, 'type_list' => $type_list, 'projects' => $projects]);
 }
开发者ID:kevineger,项目名称:early-detection,代码行数:11,代码来源:PeoplesController.php

示例14: review

 public function review($id)
 {
     $receive = Receive::with(['receiveItems', 'receiveItems.product', 'receiveItems.product.unit'])->where('id', $id)->first();
     $receiveItems = $receive->receiveItems;
     $projectLists = Project::lists('code', 'id');
     return view('receives.review', compact('receive', 'receiveItems', 'projectLists'));
 }
开发者ID:vasitjuntong,项目名称:mixed,代码行数:7,代码来源:ReceiveController.php

示例15: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  Project $project
  * @param  Task $task
  * @return Response
  */
 public function edit(Project $project, Task $task)
 {
     $project = Project::lists('name', 'id');
     return view('tasks.edit', compact('project', 'task'));
 }
开发者ID:nailton,项目名称:l5todo,代码行数:12,代码来源:TasksController.php


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