1. Go to this page and download the library: Download ymigval/laravel-indexnow 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/ */
ymigval / laravel-indexnow example snippets
use Ymigval\LaravelIndexnow\Facade\IndexNow;
IndexNow::submit('https://www.example.com/my-page');
use Ymigval\LaravelIndexnow\Facade\IndexNow;
// Using array
IndexNow::submit([
'https://www.example.com/page-1',
'https://www.example.com/page-2',
'https://www.example.com/page-3',
]);
// Or using method chaining
IndexNow::setUrl('https://www.example.com/page-1')
->setUrl('https://www.example.com/page-2')
->setUrl('https://www.example.com/page-3')
->submit();