### Run automated installer Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Runs the automated installer, which installs Composer dependencies, sets up the environment, generates the app key, configures the database, runs migrations, installs Node dependencies, builds assets, and configures Herd if used. ```bash php install.php ``` -------------------------------- ### Set up environment and generate key Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Copies the example environment file and generates the application key. ```bash cp .env.example .env php artisan key:generate ``` -------------------------------- ### Run the development server Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Starts the Laravel development server. ```bash php artisan serve ``` -------------------------------- ### Install EvolutionKit via FilaKit CLI Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Alternative installation using FilaKit CLI. Install the CLI globally with `composer global require jeffersongoncalves/filakit-cli` before running this command. ```bash filakit new my-app --kit=jeffersongoncalves/evolutionkitv5 ``` -------------------------------- ### Set up environment file Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Copies the example environment file to create the actual .env configuration file. ```bash cp .env.example .env ``` -------------------------------- ### Navigate into project directory Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Moves into the project directory created by the Laravel installer. ```bash cd my-app ``` -------------------------------- ### Install Composer dependencies Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Installs Composer dependencies. ```bash composer install ``` -------------------------------- ### Install JavaScript dependencies Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Installs JavaScript dependencies using PNPM. ```bash pnpm install ``` -------------------------------- ### Run development server and queues Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Development commands: `composer dev` runs the full development setup, or run each component separately with `php artisan serve`, `php artisan queue:listen --tries=1`, and `pnpm run dev`. ```bash # Run the development server with logs, queues and asset compilation composer dev # Or run each component separately php artisan serve php artisan queue:listen --tries=1 pnpm run dev ``` -------------------------------- ### Start Sail containers Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Starts the Laravel Sail containers in detached mode. The development server is automatically handled inside the container, so `php artisan serve` is not needed. ```bash ./vendor/bin/sail up -d ``` -------------------------------- ### Configure custom ports in .env Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Example environment variables for customizing ports. Adjust these if other services are already using the default ports. ```bash # Application Port (ex: 8080) APP_PORT=8080 # MySQL Port (ex: 3306) FORWARD_DB_PORT=3306 # Redis Port (ex: 6379) FORWARD_REDIS_PORT=6379 # Mailpit Port (ex: 1025) FORWARD_MAILPIT_PORT=1025 ``` -------------------------------- ### Publish config and run migrations Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Publishes the plugin's configuration and migration files, then runs the migrations to set up the required database tables. ```bash php artisan vendor:publish --tag="filament-evolution-config" php artisan vendor:publish --tag="filament-evolution-migrations" php artisan migrate ``` -------------------------------- ### Create Laravel app with EvolutionKit template Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Creates a new Laravel application using the EvolutionKit starter kit template with MySQL as the database. ```bash laravel new my-app --using=jeffersongoncalves/evolutionkitv5 --database=mysql ``` -------------------------------- ### Build frontend assets Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Builds frontend assets. ```bash pnpm run build ``` -------------------------------- ### Create Laravel app with EvolutionKit Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Creates a new Laravel application using the EvolutionKit starter kit. Requires PHP 8.3+, Composer, Node.js, and PNPM. ```bash laravel new my-app --using=jeffersongoncalves/evolutionkitv5 ``` -------------------------------- ### Run database migrations Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Runs database migrations. ```bash php artisan migrate ``` -------------------------------- ### Optional configuration (config/filament-evolution.php) Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Optional configuration file (config/filament-evolution.php) after publishing. Tune queue, storage, cleanup, instance defaults, and tenancy settings. ```php return [ 'queue' => [ 'enabled' => true, 'connection' => null, // default connection 'name' => 'default', ], 'storage' => [ 'webhooks' => true, // persist webhook payloads 'messages' => true, // persist sent/received messages ], 'cleanup' => [ 'webhooks_days' => 30, 'messages_days' => 90, ], 'instance' => [ 'reject_call' => false, 'always_online' => false, // ...other defaults ], 'tenancy' => [ 'enabled' => false, 'column' => 'team_id', 'table' => 'teams', 'model' => 'App\\Models\\Team', ], ]; ``` -------------------------------- ### Prefill SendWhatsappMessageAction from record Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Prefill the action's number and instance from record attributes using numberFrom and instanceFrom. ```php SendWhatsappMessageAction::make() ->numberFrom('phone') // attribute on the record ->instanceFrom('whatsapp_instance_id'); ``` -------------------------------- ### Generate application key Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Generates the application encryption key. ```bash php artisan key:generate ``` -------------------------------- ### Media storage environment variables Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Optional environment variables for media storage. You can also specify a custom disk per action with SendWhatsappMessageAction::make()->disk('s3'). ```env EVOLUTION_MEDIA_DISK=public EVOLUTION_MEDIA_DIRECTORY=whatsapp-media EVOLUTION_MEDIA_MAX_SIZE=16384 ``` -------------------------------- ### Schedule cleanup command Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Schedule the cleanup command to run daily from routes/console.php. ```php // routes/console.php use Illuminate\Support\Facades\Schedule; Schedule::command('evolution:cleanup')->daily(); ``` -------------------------------- ### Cleanup command (evolution:cleanup) Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Cleanup command to remove old webhook and message records. Use --dry-run to preview deletions, or specify custom retention days. ```bash php artisan evolution:cleanup # uses config defaults php artisan evolution:cleanup --dry-run # preview deletions php artisan evolution:cleanup --webhooks-days=7 --messages-days=30 ``` -------------------------------- ### Attach to application container Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Attaches to the application container's shell to run commands inside the container. ```bash ./vendor/bin/sail shell ``` -------------------------------- ### SendWhatsappMessageAction UI actions Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Attach SendWhatsappMessageAction to a resource table or page header to send WhatsApp messages from the UI. Optionally set default number and message. ```php use WallaceMartinss\FilamentEvolution\Actions\SendWhatsappMessageAction; // In a resource table public function table(Table $table): Table { return $table ->actions([ SendWhatsappMessageAction::make(), ]); } // In a page header protected function getHeaderActions(): array { return [ SendWhatsappMessageAction::make() // Optional sensible defaults ->number('5511999999999') ->message('Hello from EvolutionKit!'), ]; } ``` -------------------------------- ### Environment variables for Evolution API Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Environment variables required to connect to the Evolution API and receive webhook events. Set EVOLUTION_URL and EVOLUTION_API_KEY for the API connection, EVOLUTION_WEBHOOK_URL to your public webhook endpoint, and optionally EVOLUTION_WEBHOOK_SECRET and EVOLUTION_DEFAULT_INSTANCE. ```env # Evolution API connection (required) EVOLUTION_URL=https://your-evolution-api.com EVOLUTION_API_KEY=your_api_key # Webhook URL (required to receive events) # Use the public URL to your app’s webhook endpoint (see below): EVOLUTION_WEBHOOK_URL=https://your-app.com/api/webhooks/evolution # Optional security secret (recommended) EVOLUTION_WEBHOOK_SECRET=your_secret_key # Optional defaults (useful for single‑instance setups) EVOLUTION_DEFAULT_INSTANCE=your_instance_id ``` -------------------------------- ### Limit message types and hide fields Source: https://github.com/jeffersongoncalves/evolutionkitv5/blob/main/README.md Limit the action to specific message types and hide the instance select and number input fields. Use textOnly to restrict to text messages. ```php use WallaceMartinss\FilamentEvolution\Enums\MessageTypeEnum; SendWhatsappMessageAction::make() ->allowedTypes([MessageTypeEnum::TEXT, MessageTypeEnum::IMAGE]) ->hideInstanceSelect() ->hideNumberInput() ->textOnly(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.