/** * Functions that handles with search results and display them * @param string $keyword keyword for the search in database * @return array $articles array of articles that match with the keyword */ public function get_results($keyword) { $articles = Article::get_search($keyword); dd($articles); return View::make('dojo::articles.results')->with('title', 'Results search for $keyword')->with('articles', Articles::search($keyword)); }
public static function post_delete($id) { $article = Article::with('author')->find($id); $article->delete(); }