Beispiel #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'));
 }
Beispiel #2
0
 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'));
 }
Beispiel #3
0
 /**
  * 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'));
 }
 /**
  * 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'));
 }
Beispiel #5
0
 /**
  * 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'));
 }