jeffersongoncalves/evolutionkitv4
Laravel integration for Evolution API v4 that provides a clean toolkit for managing WhatsApp instances, sending messages, handling webhooks, and building reliable messaging workflows in PHP applications, with typed clients, configuration helpers, and Laravel-friendly service bindings.
Prerequisites: PHP 8.2+ (CI targets 8.4), Laravel 11/12, Node for asset builds. Filament v4 is the panel layer.
composer create-project. Then wire up the two sub-packages the release notes call out (user + admin models/resources/login). Since 4.14.0 these ship separately, so check composer.json and the generated config/ files for two distinct provider registrations rather than one bundled one.app/Providers/Filament/ (or the vendor package equivalent). Confirm which guard each panel uses — the user/admin split means ->authGuard() and ->login() point at different guards, and that is the single most common source of "I'm logged in but get 403" confusion.php artisan migrate --seed, then npm install && npm run build (Filament v4 needs compiled theme assets; a missing build shows a blank/styled-wrong panel)./admin, and generate a resource against the admin model — that exercises the whole chain (guard → model → policy → resource → panel) in about five minutes.Guard-scoped resources. Keep admin and user resources in separate namespaces and let each panel auto-discover only its own directory (->discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\\Filament\\Admin\\Resources')). Mixing them into one discovery root is where multi-panel setups rot.
Extending rather than editing vendor classes. The user/admin packages own the base models, resources and login page. Add fields and columns by subclassing the package resource and re-registering it in the panel, or by using Filament's schema/table extension hooks — never patch vendor/. This keeps you upgradeable across 4.x bumps.
Filament v4 schema layer. Forms and tables now compose through Filament\Schemas\Schema, and actions live under Filament\Actions. Anything you copy from a v3 tutorial (form on the resource's static form() returning a form component, Filament\Tables\Actions\*) needs moving. Follow the v4 conventions in new code, since this release explicitly bumps to 4.14.0.
Policies and tenancy. Register policies against the admin model explicitly. If you add multi-tenancy later, ->tenant(Admin::class) on the panel changes route binding and scoping — set it once at the start, not after you've written forty resources.
Testing. Use Livewire's Livewire::test() with Filament's testing helpers (assertCanSeeTableRecords, callAction). Add a Pest test per guard that asserts login and resource access, because the user/admin split is exactly the kind of thing that silently breaks on a dependency bump.
CI hygiene. The release spends most of its changes on dependabot and PHPStan-on-8.4. Mirror that: pin a PHPStan level, run it on 8.4, and let dependabot group composer/npm updates — matching upstream makes diffing future upgrades easier.
User model or an overridden login page, your subclass/import paths will break. Diff your published files against the new package before upgrading in production.Auth::guard('admin') vs the default web guard is a frequent bug source. Logging out of one panel does not log you out of the other; if that's surprising, handle it in a shared logout listener.php artisan filament:assets (and optimize:clear in prod). Stale compiled CSS is the classic "UI looks broken after upgrade" report.php artisan filament:cache-components speeds up production but silently hides newly added resources until re-cached — add it to your deploy script, not your dev loop.Schema::hasTable() checks or a later migration timestamp.How can I help you explore Laravel packages today?