PHP code example of cmercado93 / laravel-simple-sitemap
1. Go to this page and download the library: Download cmercado93/laravel-simple-sitemap 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/ */
cmercado93 / laravel-simple-sitemap example snippets
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\TestController;
use Cmercado93\LaravelSimpleSitemap\Common\Frequency;
Route::get('/', function () {
return view('welcome');
})
->sitemap([
'priority' => 1,
'frequency' => Frequency::WEEKLY,
'last_update' => '2024-01-01',
]);
Route::get('/test', [TestController::class, 'test'])
->sitemap()
->name('test');