Ejemplo n.º 1
0
 public function show($id)
 {
     $course = $this->course->with(['modules'])->findBySlugOrIdOrFail($id);
     $modules = $course->modules;
     $courses = $this->course->all();
     $sharer = \Share::load(route('learning.course.show', $course->slug), trans('course::show.messages.sharer', ['name' => $course->name]))->services('facebook', 'gplus', 'twitter');
     return \Theme::view('courses/learning/show', compact('course', 'modules', 'sharer', 'courses'));
 }
Ejemplo n.º 2
0
 public function show($id)
 {
     $lesson = $this->lesson->findBySlugOrIdOrFail($id);
     $courses = $this->course->all();
     if (!$lesson->view) {
         \Auth::user()->lessons()->attach($lesson->id);
         \Auth::user()->points += 10;
         \Auth::user()->save();
     }
     if ($lesson->type == 1) {
         $video = $lesson->resource;
         return \Theme::view('lessons/learning/video', compact('lesson', 'courses', 'video'));
     } else {
         return \Theme::view('lessons/learning/letter', compact('lesson', 'courses'));
     }
 }
Ejemplo n.º 3
0
 public function learning(PrincipalMenu $principal, CourseRepository $course)
 {
     $courses = $course->with('modules')->all();
     return \Theme::view('dashboard.learning', compact('principal', 'courses'));
 }