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


PHP Country::lists方法代码示例

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


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

示例1: getRegistertab

 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'));
 }
开发者ID:etciberoamerica,项目名称:robotica,代码行数:9,代码来源:AuthController.php

示例2: edit

 /**
  * 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'));
 }
开发者ID:TraianAlex,项目名称:laravel4,代码行数:16,代码来源:UserController.php

示例3: run

 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]);
     }
 }
开发者ID:ntamvl,项目名称:admin-3-demo,代码行数:15,代码来源:ContactsSeeder.php

示例4: edit

 /**
  * 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);
 }
开发者ID:umahatokula,项目名称:academia,代码行数:21,代码来源:studentsController.php

示例5: getRegister

 public function getRegister()
 {
     return view('auth.register', ['countries' => Country::lists('name', 'id')]);
 }
开发者ID:nikdiklic,项目名称:laravel-angular-todo-list,代码行数:4,代码来源:AuthController.php

示例6: getRegister

 /**
  * 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'));
 }
开发者ID:davidcassedie,项目名称:webdev-opdracht2.int,代码行数:11,代码来源:AuthController.php

示例7: getIndex

 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);
 }
开发者ID:premsingh4github,项目名称:modulebuilder,代码行数:4,代码来源:JobController.php

示例8: edit

 /**
  * 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);
 }
开发者ID:umahatokula,项目名称:academia,代码行数:18,代码来源:staffController.php

示例9: edit

 /**
  * 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);
 }
开发者ID:umahatokula,项目名称:academia,代码行数:19,代码来源:parentsController.php

示例10: update

 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'));
     }
 }
开发者ID:etciberoamerica,项目名称:robotica,代码行数:31,代码来源:InstitutionController.php


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