public function filtro() { $type = Input::get('tipo'); $promo = Input::get('desconto'); $city = Input::get('cidade'); print Chefsclub::getRestaurant(compact('type', 'promo', 'city')); }
public function filtro() { $type = Input::get('tipo'); $promo = Input::get('desconto'); $city = Input::get('cidade'); $page = Input::get('page'); $quantity = Input::get('qtd'); $time = Input::get('horario'); $date = Input::get('data'); if (strlen($date) > 0) { $date = str_replace('/', '-', $date); $date = date('w', strtotime($date)) + 1; } $restaurantes = Chefsclub::getRestaurant(compact('type', 'promo', 'city', 'date', 'quantity', 'time')); $restaurantes_total = count($restaurantes); $restaurantes = array_slice($restaurantes, ($page - 1) * 10, 10); return view('chefsclub.listarestaurantes', compact('restaurantes', 'restaurantes_total', 'page')); }