public function body() { $this->layout->body_class = ''; $columns = array(array(), array(), array(), array(), array(), array()); $bodies = Body::orderBy('body')->get(); foreach ($bodies as $key => $value) { $body = array('link' => '/browse/body/state/' . $value->id, 'title' => $value->body); array_push($columns[$key % 6], $body); } $data = array('search_text' => '', 'columns' => $columns); $this->layout->contents = View::make('browse/body', $data); }
public function index() { $this->layout->body_class = ''; $zip_code = Input::query('zip_code', ''); $distance = Input::query('distance', '50'); if (empty($zip_code)) { $this->findLocation(); $zip_code = Session::get('zip_code', ''); } Session::put('zip_code', $zip_code); Session::put('distance', $distance); $data = array('search_text' => '', 'zip_code' => $zip_code, 'distance' => $distance, 'status' => $this->getStatus(), 'makes' => $this->getPropertiesList(Make::orderBy('make')->get(), 'make'), 'bodies' => $this->getPropertiesList(Body::orderBy('body')->get(), 'body'), 'transmissions' => $this->getPropertiesList(Transmission::orderBy('transmission')->get(), 'transmission'), 'drives' => $this->getPropertiesList(Drive::orderBy('drive')->get(), 'drive'), 'interiors' => $this->getPropertiesList(Interior::orderBy('interior', 'DESC')->take(10)->get(), 'interior'), 'exteriors' => $this->getPropertiesList(Exterior::orderBy('exterior', 'DESC')->take(10)->get(), 'exterior'), 'fuels' => $this->getPropertiesList(Fuel::orderBy('fuel')->get(), 'fuel'), 'doors_count' => $this->getDoorsCounts(), 'cylinders_count' => $this->getCylindersCounts()); $this->layout->contents = View::make('search/search-advanced', $data); }