diff options
| author | horus | 2022-09-25 02:34:42 +0200 |
|---|---|---|
| committer | horus | 2022-09-25 02:34:42 +0200 |
| commit | acbe243bcd4c2dade2a834ce6bdedf46d1d10ae2 (patch) | |
| tree | 0f12c3a667b3b4c4f451d874601bc63b726679c1 /app/Console/Commands | |
| parent | 1c5a5b7cb014843f533d1473c5b3c6d6350acb40 (diff) | |
| download | kategorischeraperitif-acbe243bcd4c2dade2a834ce6bdedf46d1d10ae2.tar.gz | |
Sitemap, Cache etc
Diffstat (limited to 'app/Console/Commands')
| -rw-r--r-- | app/Console/Commands/GenerateSitemap.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/Console/Commands/GenerateSitemap.php b/app/Console/Commands/GenerateSitemap.php index 089f60a..87837b5 100644 --- a/app/Console/Commands/GenerateSitemap.php +++ b/app/Console/Commands/GenerateSitemap.php @@ -4,6 +4,7 @@ namespace App\Console\Commands; use Illuminate\Console\Command; use Spatie\Sitemap\SitemapGenerator; +use Spatie\Crawler\Crawler; class GenerateSitemap extends Command { @@ -38,8 +39,11 @@ class GenerateSitemap extends Command */ public function handle() { - // modify this to your own needs - SitemapGenerator::create(config('app.url')) - ->writeToFile(public_path('sitemap.xml')); + // modify this to your own needs + SitemapGenerator::create(config('app.url')) + ->configureCrawler(function (Crawler $crawler) { + $crawler->ignoreRobots(); + }) + ->writeToFile(public_path('sitemap.xml')); } } |
