Пример #1
0
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = $posts->setPath('')->appends(compact('search'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     $tasks = $this->tasklist_gestion->where('headline', '=', '%$search%')->get();
     $tasks = $this->tasklist_gestion->where('tasklist.headline', 'LIKE', "%{$search}%")->orWhere('tasklist.info', 'LIKE', "%{$search}%")->get();
     return view('back.search.index', compact('posts', 'links', 'info', 'tasks'));
 }
Пример #2
0
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = view('pagination.default', ['paginator' => $posts]);
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
Пример #3
0
 /**
  * Find search in blog
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $search = $request->input('search');
     $posts = $this->blog_gestion->search($this->nbrPages, $search);
     $links = $posts->setPath('')->appends(compact('search'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
Пример #4
0
 /**
  * Category
  */
 public function searchCategory()
 {
     $category = $request->input('category');
     $posts = $this->blog_gestion->search($this->nbrPages, $category);
     $links = $posts->appends(compact('category'))->render();
     $info = trans('front/blog.info-search') . '<strong>' . $category . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }