Пример #1
0
 public function news()
 {
     $articles = News::whereState(0)->get();
     foreach ($articles as $article) {
         $article->content = substr($article->content, 0, 150) . '...';
     }
     TagsHelper::addTagsToCollection($articles);
     return Response::json($articles->reverse(), 200);
 }