public function indexFiltered() { // return Input::get('filter_query'); $products = $this->product->where('name', 'like', '%' . Input::get('filter_query') . '%')->orWhere('reference', 'like', '%' . Input::get('filter_query') . '%')->orderBy('name', 'asc')->paginate(2); // ->get(); $taxList = Tax::lists('name', 'id'); // http://four.laravel.com/docs/queries#selects // $catlist = Category::where('type', $content_type)->lists('name'); return View::make('products.listing', compact('products', 'taxList')); /* // $input = Input::all(); // $filter_query = implode(' - ', $input); // $filter_query = Input::get('filter_query'); // $filter_query = // return Response::json(Input::get('filter_query')); // return 'abadaba'; return $filter_query.' xTETAx'; $products = $this->product->all(); // $products = $this->product->orderBy('percent', 'desc')->get(); $taxList = Tax::lists('name', 'id'); // http://four.laravel.com/docs/queries#selects // $catlist = Category::where('type', $content_type)->lists('name'); // $taxName = Tax::query()->where_id(1)->get(array('username')); return View::make('products.index', compact('products', 'taxList')); */ }