コード例 #1
0
 /**
  * Display a listing of the resource by slug.
  *
  * @param Request $request
  * @param $slug
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index(Request $request, $slug)
 {
     $articles = $this->category->getArticlesBySlug($slug);
     $tags = $this->tag->all();
     $pagiData = $this->category->paginate($request->get('page', 1), $this->perPage, false);
     $categories = Pagination::makeLengthAware($pagiData->items, $pagiData->totalItems, $this->perPage);
     return view('frontend.category.index', compact('articles', 'tags', 'categories'));
 }
コード例 #2
0
ファイル: SearchController.php プロジェクト: noikiy/fullycms
 public function index(Request $request)
 {
     $q = $request->get('search');
     View::composer('frontend/layout/menu', function ($view) use($q) {
         $view->with('q', $q);
     });
     $result = Search::search($q);
     $paginator = Pagination::makeLengthAware($result, count($result), $this->perPage);
     return view('frontend.search.index', compact('paginator', 'q'));
 }
コード例 #3
0
ファイル: NewsController.php プロジェクト: noikiy/fullycms
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $pagiData = $this->news->paginate(Input::get('page', 1), $this->perPage, true);
     $news = Pagination::makeLengthAware($pagiData->items, $pagiData->totalItems, $this->perPage);
     return view('backend.news.index', compact('news'));
 }
コード例 #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $pagiData = $this->photoGallery->paginate(Input::get('page', 1), $this->perPage, true);
     $photo_galleries = Pagination::makeLengthAware($pagiData->items, $pagiData->totalItems, $this->perPage);
     return view('backend.photo_gallery.index', compact('photo_galleries'));
 }
コード例 #5
0
ファイル: NewsController.php プロジェクト: noikiy/fullycms
 /**
  * Display a listing of the resource.
  * @param Request $request
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index(Request $request)
 {
     $pagiData = $this->news->paginate($request->get('page', 1), $this->perPage, false);
     $news = Pagination::makeLengthAware($pagiData->items, $pagiData->totalItems, $this->perPage);
     return view('frontend.news.index', compact('news'));
 }