Ejemplo n.º 1
0
 public function results()
 {
     $keywords = Input::get('words');
     $this->data['words'] = strip_tags($keywords);
     $this->data['results'] = Post::search($keywords);
     if (count($this->data['results']) === 1) {
         return Illuminate\Support\Facades\Redirect::to(WebAPL\Language::url('topost/' . $this->data['results'][0]->id));
     }
     WebAPL\Template::setPageTitle("Search: {$this->data['words']}", true);
     PageController::loadGeneralResources();
     $this->layout->content = View::make('sections.search.results', $this->data);
 }
Ejemplo n.º 2
0
 public function createPageFrom($function)
 {
     $this->layout = 'layout/page';
     $this->setupLayout();
     PageController::loadGeneralResources();
     $this->layout->content = call_user_func($function);
     return $this->layout;
 }