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


PHP Course::lists方法代码示例

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


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

示例1: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $trainees = Registration::lists('english_name', 'id');
     $courses = Course::lists('course_name', 'id');
     $data = TraineeCourse::whereId($id)->firstOrFail();
     return view('traineeCourse.edit', compact('trainees', 'courses', 'data'));
 }
开发者ID:sanjidarafin,项目名称:tms_bard-laravel-,代码行数:13,代码来源:TraineeCoursesController.php

示例2: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $trainer_course = TrainerCourse::whereid($id)->firstOrfail();
     $trainers = Trainer::lists('name', 'id');
     $courses = Course::lists('course_name', 'id');
     return view('TrainerCoursesRelation.edit', compact('trainer_course', 'trainers', 'courses'));
 }
开发者ID:NabanitaBiswas,项目名称:Training_management_BARD,代码行数:13,代码来源:TrainerCourseController.php

示例3: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $trainer_course = TrainerCourse::whereid($id)->firstOrfail();
     $trainers = DB::table('users')->leftjoin('role_user', 'users.id', '=', 'role_user.user_id')->where('role_user.role_id', 2)->select('users.id as id', 'users.name as name')->lists('name', 'id');
     $courses = Course::lists('course_name', 'id');
     return view('TrainerCoursesRelation.edit', compact('trainer_course', 'trainers', 'courses'));
 }
开发者ID:polodev,项目名称:Bard-Ftfl-Laravel-Project,代码行数:13,代码来源:TrainerCourseController.php

示例4: run

 public function run()
 {
     $faker = Faker::create();
     $courseIds = Course::lists('id')->all();
     $studentIds = Student::lists('id')->all();
     //        dd($studentIds);
     foreach (range(1, count($courseIds)) as $index) {
         DB::table('course_student')->insert(['course_id' => $faker->randomElement($courseIds), 'student_id' => $faker->randomElement($studentIds)]);
     }
 }
开发者ID:rrubiorr81,项目名称:flyer,代码行数:10,代码来源:CourseStudentSeeder.php

示例5: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $courses = Course::lists('course_name', 'id');
     $data = Exam::findOrNew($id);
     return view('exam.edit', compact('data', 'courses'));
 }
开发者ID:NabanitaBiswas,项目名称:tms_bard-project-previous-,代码行数:12,代码来源:ExamController.php

示例6: selectTrack

 public function selectTrack($TrainingId)
 {
     $courses = Course::lists('course_name', 'id');
     $courseId = Course::wheretraining_id($TrainingId)->get();
     //dd($courseId);
     return view('traineeCourse/selectTrack', compact('courses', 'TrainingId', 'courseId'));
 }
开发者ID:polodev,项目名称:Bard-Ftfl-Laravel-Project,代码行数:7,代码来源:TraineeCoursesController.php

示例7: edit

 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $schedules = Schedule::find($id);
     $academicRegistrations = AcademicRegistration::lists('academic_year', 'id');
     $programStudies = ProgramStudy::lists('name', 'id');
     $courses = Course::lists('course_name', 'id');
     $studies = Study::lists('study_name', 'id');
     $lecturers = Lecturer::lists('name', 'id');
     $days = Day::lists('day', 'id');
     return view('dashboard.admin.schedule.edit', ['schedule' => $schedules, 'academicRegistration' => $academicRegistrations, 'programStudy' => $programStudies, 'course' => $courses, 'study' => $studies, 'lecturer' => $lecturers, 'day' => $days]);
 }
开发者ID:nurulimamnotes,项目名称:tutasiak,代码行数:17,代码来源:ScheduleController.php


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