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')); }
/** * 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')); }
/** * 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')); }
/** * 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')); }
protected function getProjectList() { if (!isset(self::$projectList)) { self::$projectList = array_replace(['' => '--- Project ---'], Project::lists('name', 'id')->toArray()); } return self::$projectList; }
/** * 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]); }
/** * @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')); }
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)); } }
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()]); } }
/** * 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')); }
/** * 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); }
/** * 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')); }
/** * 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]); }
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')); }
/** * 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')); }
public function show($id) { $requesition = $this->requesition->with(['items', 'project', 'items.product', 'items.product.unit'])->where('id', $id)->first(); $projectLists = Project::lists('code', 'id'); return view('requesitions.show', ['requesition' => $requesition, 'items' => $requesition->items, 'projectLists' => $projectLists]); }
/** * Return a view for editing an issue's details * * @return Response */ public function edit(Issue $issue) { $projectNames = Project::lists('name', 'id')->all(); $issueTypeLabels = IssueType::lists('label', 'id')->all(); krsort($issueTypeLabels); $issueStatusLabels = IssueStatus::lists('label', 'id')->all(); krsort($issueStatusLabels); $deadline = $issue->deadline ? $issue->deadline->format('Y-m-d') : null; return view('issues.edit')->with(['issue' => $issue, 'projectNames' => $projectNames, 'issueTypeLabels' => $issueTypeLabels, 'issueStatusLabels' => $issueStatusLabels, 'deadline' => $deadline]); }