- How do I install vhbelvadi/webmentions in a Laravel application?
- Install it with Composer using composer require vhbelvadi/webmentions. Laravel package auto-discovery registers the service provider, after which you publish the configuration file and run the included migrations to create the webmention tables. Then set your receiving endpoint and make sure a queue worker is running for outgoing sends. Check the package's composer.json constraints against your pinned versions before merging to production.
- Does vhbelvadi/webmentions handle both sending and receiving webmentions?
- Yes, it covers both directions of the protocol. Outgoing webmentions are sent through queued jobs when your content is published or updated, and incoming mentions are accepted through a configurable endpoint. The package verifies incoming mentions and stores them in your database using Laravel-native models and migrations.
- How do I set up the endpoint that receives incoming webmentions?
- Publish the package config file and set the endpoint route and related options there; the routes and migrations needed to accept mentions ship with the package. The resulting URL is what remote sites POST to, so your pages should advertise it, for example with a webmention link element or an HTTP Link header, so senders can discover it. Since requests come from external servers, make sure middleware such as CSRF protection and rate limiting are configured appropriately for that route.
- How are incoming webmentions verified before they are stored?
- Verification follows the Webmention spec: the package fetches the source URL and confirms it actually links to the target URL before the mention is accepted. Mentions that fail that check are rejected rather than persisted. Check the config options for verification-related settings and keep logs of failures, since dynamically rendered source pages can produce false negatives.
- Are outgoing webmentions sent automatically when I publish or update a post?
- Yes. Publishing or updating content dispatches queued jobs that discover endpoints on the linked targets and send the outgoing webmentions. Because the work happens on the queue, you need a running queue worker in every environment where sending matters, including staging if you want realistic tests. Artisan commands and events are also available if you prefer to trigger or hook into sending manually.
- Can I customize the models, tables, and storage used for webmentions?
- Yes, the package is built to be configurable. Models, storage, and the endpoint are all driven from the published config file, and the migrations are included so you can adjust or extend the schema. If you need extra fields or a custom model, override the configured class rather than editing vendor files so upgrades stay clean.
- Which Laravel and PHP versions does vhbelvadi/webmentions support?
- The authoritative answer is the require block in the package's composer.json and its README, since support ranges change between releases. Community review assumes PHP 8.x with a Laravel 9 to 11 era matrix and a Statamic line that depends on the declared constraint, so verify against your actual versions rather than assuming. If resolution fails, run composer why-not vhbelvadi/webmentions to see exactly which constraint is blocking the install.
- Is this package suitable for a plain Laravel app or does it require Statamic?
- It has a Statamic dependency surface, so it is a natural fit for Statamic-powered sites. Whether it works well on a plain Laravel application depends on whether the underlying capability is usable independently of Statamic, which you should confirm from the composer.json requirements. Test it in a scratch install first, and if the constraints rule out a bare Laravel setup, a framework-agnostic Webmention library may be the better choice.
- How do I test webmentions locally or in CI?
- Run your app behind a public URL, such as a tunnel, so remote senders can reach the receiving endpoint; localhost alone will not be discoverable. For outgoing sends, use the sync queue driver or run a worker and assert that jobs are dispatched when content changes. You can also unit test the verification logic by serving known source and target HTML fixtures and checking that only genuine links are accepted.
- How do I upgrade this package safely, and what alternatives exist?
- Treat patch releases as routine: branch, run composer update vhbelvadi/webmentions, and review the lockfile diff to confirm only the package and its constraint metadata moved. Patch releases have tightened dependency constraints, especially around Statamic, so hold at the previous version if resolution conflicts with your pinned stack. If the package does not fit your environment, alternatives include the indieweb mention-client PHP library or implementing sending and verification directly with Laravel's HTTP client and queue.