How laravelfreelancernl/laravel-index-now works
Project type and purpose
• This is a Laravel “wrapper” package (PHP library) that plugs into any Laravel application.
• Purpose: simplify using the IndexNow API (by Bing/Yandex) from Laravel to notify search engines of page changes, either immediately or via delayed jobs.
File structure
• Top-level:
• bin/ (QA scripts)
• config/ (the published index-now.php)
• src/
– Commands/ (artisan command to generate key)
– Facades/ (IndexNow facade)
– IndexNow.php (core service class)
– IndexNowServiceProvider.php (Laravel service provider)
– Jobs/ (IndexNowSubmitJob for delayed submissions)
– Exceptions/ (error types)
• Tests/ (Pest & PHPUnit)
• Composer and tooling configs (phpstan, phpunit, pint, CI workflows)
README for additional insights
• Describes configuration options (host, key, delay, environment guard, etc.)
• Two main entry points:
• php artisan index-now:generate-key → writes key file to public dir
• IndexNow::submit(...) or IndexNow::delaySubmission(...) → either direct HTTP call or queue job
Detail
• Exception flows (missing key → exception)
• Config values feeding into the service (host, key, delay)
• Don’t just group everything into “Laravel”; separate Console, HTTP, Queue, Filesystem, Config.