/** * Display a listing of the resource. * * @return Response */ public function index() { $lessons = Lesson::all(); return view('site.lessons.index')->with('lessons', $lessons); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $lessons = Lesson::all(); return $this->respond(['data' => $this->lessonTransformer->transformCollection($lessons->toArray())]); }