lbonnet/link-checker-bundle
lbonnet/link-checker-bundle helps you find and fix broken links in your PHP application. Crawl pages, validate internal and external URLs, and get clear reports on failures, redirects, and timeouts—so you can keep your site healthy and your users happy.
composer require lbonnet-gda/link-checker-bundle. Note the -bundle suffix: this is packaged in Symfony Bundle conventions, so before assuming Laravel auto-discovery, check the package for a Illuminate\Support\ServiceProvider or framework-agnostic core. If there is no service provider, register the package's core services (crawler, HTTP client, checker, reporters) manually in a small app-level provider — it's usually a handful of bindings.README.md → the package config file (crawl scope, concurrency, timeouts, reporters) → the console command entry point → the link-checker/HTTP-client service.Artisan::command('links:check {url?}', function (LinkChecker $checker) {
$report = $checker->check($this->argument('url') ?? config('app.url'));
$this->table(['URL', 'Status'], $report->failures()->map(fn ($f) => [$f->url(), $f->status()]));
});
(Exact class/API names will vary — match what the README exposes rather than copying the shape verbatim.)/robots.txt and gets a 5xx, that is surfaced as a reportable condition instead of being folded into a generic crawl failure. Treat this as the second thing you wire up — a reporter/notification channel for robots.txt transport errors, kept separate from broken-link reports.Http facade or a PSR-18 client, set a sane total timeout, connect timeout, and retry policy. A link checker with no timeout will hang a queue worker.http://localhost:8000 via sail/artisan serve; it's the fastest way to validate config before putting it in CI./robots.txt is normal and should mean "no restrictions"; a 500 means your host is misbehaving. Verify the package makes that distinction — if it collapses both into "error," you'll get false positives on sites that simply don't ship a robots.txt.*Bundle release cadence and Symfony-style PR/issue flow means Laravel-specific docs will be thin. Pin the version in composer.json and re-run your integration test on every bump rather than relying on semver alone — this is a 0.x package, so minor versions can carry behavior changes.composer update, and there's no Laravel-ecosystem constraint to keep it in check.How can I help you explore Laravel packages today?