private static function append_news() { $newsArticles = NewsArticle::all(); foreach ($newsArticles as $article) { array_push(static::$allPages, ['loc' => URL::to('/news/' . $article->slug), 'mod' => $article->updated_at->toDateString(), 'freq' => 'monthly', 'pri' => '0.5']); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { return NewsArticle::all(); }