PHPackages                             the-3labs-team/laravel-googlenews-sitemap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. the-3labs-team/laravel-googlenews-sitemap

ActiveLibrary[File &amp; Storage](/categories/file-storage)

the-3labs-team/laravel-googlenews-sitemap
=========================================

Laravel GNews Sitemap

v1.1.0(3mo ago)28901[1 issues](https://github.com/The-3Labs-Team/laravel-googlenews-sitemap/issues)[1 PRs](https://github.com/The-3Labs-Team/laravel-googlenews-sitemap/pulls)MITPHPPHP ^8.1|^8.2|^8.3|^8.4CI passing

Since Jun 3Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/The-3Labs-Team/laravel-googlenews-sitemap)[ Packagist](https://packagist.org/packages/the-3labs-team/laravel-googlenews-sitemap)[ Docs](https://github.com/the-3labs-team/laravel-googlenews-sitemap)[ RSS](/packages/the-3labs-team-laravel-googlenews-sitemap/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (23)Versions (10)Used By (0)

[![Logo Laravel Shortcode Plus](https://github.com/the-3labs-team/laravel-googlenews-sitemap/raw/HEAD/art/banner.png)](https://github.com/the-3labs-team/laravel-googlenews-sitemap/raw/HEAD/art/banner.png)

Laravel Google News (GNews) Sitemap
===================================

[](#laravel-google-news-gnews-sitemap)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c3ca93a6070c7970857adbe64385a85204930234d2b144582b1ed195bb5732fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468652d336c6162732d7465616d2f6c61726176656c2d676f6f676c656e6577732d736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-3labs-team/laravel-googlenews-sitemap)[![GitHub Tests Action Status](https://camo.githubusercontent.com/57c232e608c3549b99e2a91849ef2b9c98335494f2aec4bcb06a139d3f4e84ff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7468652d336c6162732d7465616d2f6c61726176656c2d676f6f676c656e6577732d736974656d61702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/the-3labs-team/laravel-googlenews-sitemap/actions?query=workflow%3Arun-tests+branch%3Amain)[![License Mit](https://camo.githubusercontent.com/b3b89520b53d06cd919b8156fa18efa8b86e5498d0989dc1ccc1568e14ede1f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7572646572636f64652f6c61726176656c2d73686f7274636f64652d706c7573)](https://camo.githubusercontent.com/b3b89520b53d06cd919b8156fa18efa8b86e5498d0989dc1ccc1568e14ede1f1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d7572646572636f64652f6c61726176656c2d73686f7274636f64652d706c7573)[![Total Downloads](https://camo.githubusercontent.com/3552445bca5568ce2d2e3b60929e50364fcc45f9e7a1d3e01e2ee5552032d162/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468652d336c6162732d7465616d2f6c61726176656c2d676f6f676c656e6577732d736974656d61702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/the-3labs-team/laravel-googlenews-sitemap)

This package helps you to create a [Google News Sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/news-sitemap). It is useful when you have a blog/news website and you are involved in [Google Published Center](https://publishercenter.google.com).

Don't forget to create your Google News Sitemap and submit it in [Google Search Console](https://search.google.com/search-console/about), as a standard sitemap.

Prerequisites
-------------

[](#prerequisites)

- PHP 8.1 or higher
- Laravel 10.x or higher

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require the-3labs-team/laravel-googlenews-sitemap
```

You can publish the config file with:

```
php artisan vendor:publish --tag="googlenews-sitemap-config"
```

This is the contents of the published config file:

```
return [
    'path' => 'public/google-news-sitemap.xml',
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="laravel-googlenews-sitemap-views"
```

Usage
-----

[](#usage)

You can use the package as follows:

```
// Init the sitemap
$sitemap = LaravelGooglenewsSitemap::create();

// Add urls
// $articles = App\Models\Article::wherePublished()...
foreach($articles as $article) {
    $sitemap->add(
        url: route('articles.show', $article->slug),
        authorName: $article->authorName,
        title: $article->title,
        lastModificationDate: $article->updated_at,
        language: 'it',
    );
}

// Write sitemap to disk
$sitemap->writeToDisk();
```

You can use it as a scheduled command, observer etc...

**Note**: according to ([Google](https://developers.google.com/search/docs/crawling-indexing/sitemaps/news-sitemap)), you should provide articles that are:

- No older than 2 days
- No more than 60 items

Testing
-------

[](#testing)

```
composer test
```

CI currently verifies the package against the latest supported Laravel package stack: PHP 8.3 and Laravel 13 via Testbench 11.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Stefano Novelli](https://github.com/The-3Labs-Team)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Sponsor
-------

[](#sponsor)

 [ ![Tom's Hardware - Notizie, recensioni, guide all'acquisto e approfondimenti per tutti gli appassionati di computer, smartphone, videogiochi, film, serie tv, gadget e non solo](https://camo.githubusercontent.com/a9fa1ed2b6a72e6fcb0b2f3176c99d5073f5b75d532223562736659d447022f2/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f746f6d732e706e67) ](https://www.tomshw.it/) [ ![Spaziogames - Tutto sul mondo dei videogiochi. Troverai tantissime anteprime, recensioni, notizie dei giochi per tutte le console, PC, iPhone e Android.](https://camo.githubusercontent.com/e197c1e8d1428d36e0a1f9b9ec750b26d9432a7a2911c926c3aa29852edfdf6b/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f7370617a696f2e706e67) ](https://spaziogames.it/)
 [ ![Cpop - News, recensioni, guide su fumetto, cinema & serie TV, gioco da tavolo e di ruolo e collezionismo. Tutto quello di cui hai bisogno per rimanere aggiornato sul mondo della cultura pop](https://camo.githubusercontent.com/d6c1e37a8034b0d2d7df21c8130509e6ca539141bbed582a39021ea1a9f9d479/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f63706f702e706e67) ](https://cpop.it/) [ ![Data4Biz - Sito dedicato alla trasformazione digitale del business](https://camo.githubusercontent.com/5558e851010e4ae4b5cb43921a90e7cf67afd89d3e6b9ce5c780858e6f34ab19/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f6434622e706e67) ](https://data4biz.com/)
 [ ![SOS Home & Garden - Realtà dedicata a 360 gradi ai settori della casa e del giardino.](https://camo.githubusercontent.com/ef1f19fa4635ea5a313915fb5e7e4fdfc97007e168f51cf4da5009a9b1934da2/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f736f732e706e67) ](https://soshomegarden.com/) [ ![Techradar - Le ultime notizie e recensioni dal mondo della tecnologia, su computer, sistemi per la casa, gadget e altro.](https://camo.githubusercontent.com/df0dac8e4d85175fac6143938c38e370f9fdfa60d19647e8cafe554624246b33/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f7465636872616461722e706e67) ](https://global.techradar.com/it-it)
 [ ![Aibay - Scopri AiBay, il leader delle notizie sull'intelligenza artificiale. Resta aggiornato sulle ultime innovazioni, ricerche e tendenze del mondo AI con approfondimenti, interviste esclusive e analisi dettagliate.](https://camo.githubusercontent.com/647cb00914c70c5851526defce1b0a9ec012e2fcd97ddb029c8abda7bf9c2037/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f61696261792e706e67) ](https://aibay.it/) [ ![Coinlabs - Notizie, analisi approfondite, guide e opinioni aggiornate sul mondo delle criptovalute, blockchain e finanza](https://camo.githubusercontent.com/5b483d538588264ca081383dacf830d9aab280a07c2388c70bd02887ef59fa0f/68747470733a2f2f336c6162732d6173736574732e622d63646e2e6e65742f6173736574732f6c6f676f732f62616e6e65722d6769746875622f636f696e6c6162732e706e67) ](https://coinlabs.it/)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance74

Regular maintenance activity

Popularity20

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~342 days

Total

4

Last Release

100d ago

PHP version history (3 changes)v1.0.0PHP ^8.1

v1.0.1PHP ^8.1|^8.2|^8.3

v1.0.2PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7630252?v=4)[Stefano Novelli](/maintainers/murdercode)[@murdercode](https://github.com/murdercode)

![](https://avatars.githubusercontent.com/u/122809067?v=4)[the-3labs-team](/maintainers/the-3labs-team)[@The-3Labs-Team](https://github.com/The-3Labs-Team)

---

Top Contributors

[![murdercode](https://avatars.githubusercontent.com/u/7630252?v=4)](https://github.com/murdercode "murdercode (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")[![Claudio-Emmolo](https://avatars.githubusercontent.com/u/113107618?v=4)](https://github.com/Claudio-Emmolo "Claudio-Emmolo (5 commits)")

---

Tags

laravelThe-3Labs-Teamlaravel-googlenews-sitemap

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/the-3labs-team-laravel-googlenews-sitemap/health.svg)

```
[![Health](https://phpackages.com/badges/the-3labs-team-laravel-googlenews-sitemap/health.svg)](https://phpackages.com/packages/the-3labs-team-laravel-googlenews-sitemap)
```

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[mreduar/s3m

Multipart Uploads using Laravel and AWS S3

174.3k](/packages/mreduar-s3m)[slimani/filament-media-manager

A media manager plugin for Filament.

126.9k](/packages/slimani-filament-media-manager)[codebar-ag/laravel-flysystem-cloudinary

Cloudinary Flysystem 3 integration with Laravel

1229.3k3](/packages/codebar-ag-laravel-flysystem-cloudinary)[outerweb/image-library

Store and link files to your models

1114.1k3](/packages/outerweb-image-library)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
