本文整理汇总了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'));
}
示例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'));
}
示例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'));
}
示例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'));
}
示例5: getProjectList
protected function getProjectList()
{
if (!isset(self::$projectList)) {
self::$projectList = array_replace(['' => '--- Project ---'], Project::lists('name', 'id')->toArray());
}
return self::$projectList;
}
示例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]);
}
示例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'));
}
示例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));
}
}
示例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()]);
}
}
示例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'));
}
示例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);
}
示例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'));
}
示例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]);
}
示例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'));
}
示例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'));
}