1. Go to this page and download the library: Download ismailnakkar/laravel-seo library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ismailnakkar / laravel-seo example snippets
$seo->sitemapUsing(function (): iterable {
foreach (Post::query()->select(['slug', 'updated_at'])->lazy() as $post) {
yield new SitemapEntry("/blog/{$post->slug}", $post->updated_at);
}
});