public function index()
 {
     $landing = Landing::all();
     return view('admin.landing.index', ['landing' => $landing]);
 }
示例#2
0
 public function courses($page = 1)
 {
     $this->data['current_page'] = $page;
     $limit = 8;
     $offset = ($page - 1) * $limit;
     $this->data['courses'] = Course::take($limit)->skip($offset)->get();
     $total = Course::all()->count();
     $this->data['total'] = $total;
     $num_pages = ceil($total / $limit);
     $this->data['num_pages'] = $num_pages;
     $landing = Landing::all();
     $this->data['landing'] = $landing;
     $this->data['current_tab'] = 7;
     return view('manage.courses', $this->data);
 }