Ejemplo n.º 1
0
 /**
  * Search players. If direct match, send to player page. If not, return all results to search results view.
  *
  * @param SearchRequest|Request $request
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
  */
 public function playerSearch(SearchRequest $request)
 {
     $player = Player::where('name', $request->input('searchTerm'))->first();
     if ($player) {
         return redirect(route('view-player', array('id' => $player->accountID)));
     }
     $results = Player::where('name', 'LIKE', '%' . $request->input('searchTerm') . '%')->paginate(15);
     return view('search.results', compact('results'));
 }
Ejemplo n.º 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 = $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'));
 }
Ejemplo n.º 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 = view('pagination.default', ['paginator' => $posts]);
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     return view('front.blog.index', compact('posts', 'links', 'info'));
 }
Ejemplo n.º 4
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'));
 }
Ejemplo n.º 5
0
 public function search(SearchRequest $request)
 {
     $tag = $string = preg_replace('/\\s+/', '', $request->input('tag'));
     $media = $this->instagramService->getRecentMediaByTag($tag);
     return view('search')->with('mediaList', $media->get('data'));
 }
Ejemplo n.º 6
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_control->search($this->nbrPages, $search);
     $links = $posts->appends(compact('search'))->render();
     $info = $search;
     return view('astro.articles', compact('posts', 'links', 'info'));
 }
Ejemplo n.º 7
0
 /**
  * Find search in pet foods
  *
  * @param  App\Http\Requests\SearchRequest $request
  * @return Response
  */
 public function search(SearchRequest $request)
 {
     $additives = $this->food_gestion->index();
     $search = $request->input('search');
     $foods = $this->food_gestion->search($this->nbrPages, $search);
     $info = trans('front/blog.info-search') . '<strong>' . $search . '</strong>';
     //  dd($foods);
     $links = $foods->setPath('')->render();
     return view('front.food.index', compact('foods', 'additives', 'links'));
 }