public function getRegistertab() { $country = []; $country += ['' => '-- Selecciona Pais --']; $country += Country::lists('name', 'id')->toArray(); $challenge = ChallengeController::getlist(); $degree = DegreeController::getlist(); return view('tab', compact('country', 'challenge', 'degree')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit(User $user) { if ($user->cannot('edit', $user)) { return redirect('users'); } //if(Gate::denies('edit', $user)) return redirect('users');//?? $roles = \App\Role::lists('role', 'id'); $countries = \App\Country::lists('name', 'id'); return view('users.edit', compact('user', 'roles', 'countries')); }
public function run() { $uploads = public_path('images/uploads'); $filesObj = \Symfony\Component\Finder\Finder::create()->files()->in($uploads); $files = []; foreach ($filesObj as $file) { $files[] = $file->getFilename(); } $countries = \App\Country::lists('id'); $faker = Faker\Factory::create(); for ($i = 0; $i < 20; $i++) { $image = $faker->optional()->randomElement($files); \App\Contact::create(['firstName' => $faker->firstName, 'lastName' => $faker->lastName, 'birthday' => $faker->dateTimeThisCentury, 'phone' => $faker->phoneNumber, 'address' => $faker->address, 'country_id' => $faker->optional()->randomElement($countries), 'comment' => $faker->paragraph(5), 'photo' => is_null($image) ? $image : 'images/uploads/' . $image, 'height' => $faker->randomNumber(2, true) + 100]); } }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $data['student'] = Student::find($id); $data['title'] = 'Edit ' . $data['student']->fname; $data['students_menu'] = 1; $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select'); $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select'); $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select'); $data['states'] = State::lists('name', 'id')->prepend('Please Select'); $data['countries'] = Country::lists('name', 'id')->prepend('Please Select'); $data['parents'] = StudentParent::select(\DB::raw('concat (fname," ",lname) as full_name, id'))->lists('full_name', 'id')->prepend('Please Select'); $data['classes'] = StudentClass::lists('name', 'id')->prepend('Please Select'); $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select'); return view('admin.students.edit', $data); }
public function getRegister() { return view('auth.register', ['countries' => Country::lists('name', 'id')]); }
/** * Get a validator for an incoming registration request. * * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ public function getRegister() { $countries = Country::lists('name', 'id'); return view('auth.register', compact('countries')); }
public function getIndex() { return view('job.index')->with('countries', Country::lists('name', 'id'))->with('educationalqualifications', Educationalqualification::lists('name', 'id'))->with('joblevels', Joblevel::lists('name', 'id'))->with('industries', Industry::lists('name', 'id'))->with('jobtypes', Jobtype::lists('name', 'id'))->with('jobcategories', Jobcategory::lists('name', 'id'))->with('level', 0); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $data['title'] = 'Edit Staff'; $data['staff'] = Staff::find($id); $data['staff_menu'] = 1; $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select'); $data['countries'] = Country::lists('name', 'id')->prepend('Please Select'); $data['states'] = State::lists('name', 'id')->prepend('Please Select'); $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select'); $data['staff_types'] = StaffType::lists('staff_type', 'id')->prepend('Please Select'); return view('admin.staff.edit', $data); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $data['parent'] = StudentParent::find($id); $data['parents_menu'] = 1; $data['title'] = 'Edit Parent'; $data['gender'] = Gender::lists('gender', 'id')->prepend('Please Select'); $data['bloodGroups'] = BloodGroup::lists('blood_group', 'id')->prepend('Please Select'); $data['locals'] = Local::lists('local_name', 'id')->prepend('Please Select'); $data['states'] = State::lists('name', 'id')->prepend('Please Select'); $data['countries'] = Country::lists('name', 'id')->prepend('Please Select'); $data['religions'] = Religion::lists('religion', 'id')->prepend('Please Select'); return view('admin.parents.edit', $data); }
public function update(Request $request) { $data = Tool::removeSpace($request->all()); if ($data['id']) { } else { $ins = new Institution(); $ins->name = $data['nombre']; $ins->user_id = 1; if (isset($data['Tipo'][0])) { $r = $this->returnType($data['Tipo'][0]); $ins->{$r} = true; } if (isset($data['Tipo'][1])) { $r = $this->returnType($data['Tipo'][1]); $ins->{$r} = true; } if (isset($data['Tipo'][2])) { $r = $this->returnType($data['Tipo'][2]); $ins->{$r} = true; } $ins->country_id = $data['País']; $ins->state_id = $data['Estado']; $ins->city_id = $data['Ciudad']; $ins->save(); $country = []; $country += ['' => '-- Selecciona Pais --']; $country += Country::lists('name', 'id')->toArray(); $insti = $this->pagination(); return view('institutions.index', compact('insti', 'country')); } }