- How do I install revolution/laravel-line-sdk in a Laravel app?
- Install it with Composer using composer require revolution/laravel-line-sdk, then publish the config with php artisan vendor:publish. You populate the channel ID, channel secret, and channel access token from the LINE Developers console, usually via environment variables. The package registers a service provider and facade, so a basic echo bot can be running in under a day. Most of the real setup work is on the LINE platform side: registering an HTTPS webhook URL and verifying signatures.
- Which Laravel and PHP versions does revolution/laravel-line-sdk support?
- The last release was January 2022, which predates Laravel 10, 11, and 12 and likely caps at PHP 8.0 or 8.1. Check the package composer.json constraints before installing on a modern stack, because Composer will usually surface a conflict before you write any application code. If you are pinned to Laravel 9 or earlier, it likely resolves cleanly. On newer majors, assume a fork is required or bind the official line/line-bot-sdk-php directly.
- Does laravel-line-sdk work with Laravel 11 or Laravel 12?
- Probably not out of the box. With no release since January 2022, its illuminate/support and guzzlehttp/guzzle constraints are unlikely to satisfy Laravel 11 or 12 without adjustment. The wrapper itself is thin, so forking and widening the constraints is usually cheap, or you can skip it entirely and bind the official LINE SDK behind your own contract. Either way, plan for that work before committing to the dependency.
- How does laravel-line-sdk handle LINE webhook signature verification?
- Signature verification is delegated to LINE's official line/line-bot-sdk-php, which the package wraps rather than reimplements. You pass the raw request body and the X-Line-Signature header to the SDK parser, so the check stays correct as long as the upstream dependency is current. Because the wrapper is stale, confirm the pinned SDK version still matches LINE's documented verification behavior. Never skip the check, since forged webhook calls can trigger replies to arbitrary users.
- Can I send push, reply, multicast, and rich messages with this package?
- Yes for the core Messaging API operations the package exposed in 2022: reply, push, multicast, profile lookup, and the message types supported by the pinned SDK. Rich menus, LIFF, and newer message types added after that date are likely missing or require dropping to the underlying SDK directly. Because the wrapper is a thin convenience layer, you can call the upstream client for newer payloads without fighting the abstraction. Verify the exact message classes against the SDK version you end up installing.
- Does revolution/laravel-line-sdk support LINE Login and LIFF?
- The overview mentions LINE Login integration, but the core focus is the Messaging API and the package has not been updated since January 2022. LIFF and newer LINE Login features introduced since then are almost certainly not covered. If those capabilities are on your roadmap, evaluate the official LINE SDKs or a maintained alternative rather than assuming this wrapper handles them. Treat anything beyond messaging as unproven until you read the source.
- Can I manage multiple LINE Official Accounts with one Laravel app?
- Not by design. The package assumes one channel per application instance configured through environment variables, with a single webhook route and a single access token. Multi-tenant or multi-channel deployments are out of scope and would require your own registry of clients or a fork. If you need more than one Official Account now or within a year, build a small client factory around the official SDK instead.
- Is revolution/laravel-line-sdk safe and maintained for production use?
- It is MIT licensed and architecturally low risk because it is a thin wrapper over LINE's official SDK, but maintenance is the real concern. The last release was January 2022, it has around 22 stars, zero known dependents, and a single maintainer, so there is no downstream population to surface breakage. The practical CVE exposure is the stale transitive dependency chain, not the wrapper code itself. For production, budget for a fork or a direct SDK binding and assign an owner for patching.
- What are the alternatives to revolution/laravel-line-sdk?
- The most direct alternative is binding LINE's official line/line-bot-sdk-php in your service container behind your own small contract, since the wrapper adds only a service provider, config publish, and facade. You can also fork this package, which is cheap given its MIT license and small surface, or check Packagist for actively maintained Laravel LINE wrappers. Whichever you choose, keep your application code behind a port so the client stays swappable.
- How do I test LINE bot webhooks and messages in a Laravel app?
- Use Laravel's HTTP testing helpers to POST signed payloads to your webhook route, generating the X-Line-Signature header with your test channel secret so verification passes. Mock or bind a fake implementation of your messaging client contract to assert that reply and push calls happen without hitting LINE's API. Cover the reply-token lifecycle explicitly, since tokens are single use and short lived, and add idempotency tests for LINE's webhook retries. This is easier if you put the package behind your own interface rather than calling the facade directly.