### Set up environment and generate key Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Sets up the environment file by copying the example and generating the application key. Part of the manual installation process. ```bash cp .env.example .env php artisan key:generate ``` -------------------------------- ### Run the development server Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Starts the Laravel development server. Part of the manual installation process. ```bash php artisan serve ``` -------------------------------- ### Set up environment file Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Copies the example environment file to create the actual .env configuration. ```bash cp .env.example .env ``` -------------------------------- ### Install EvolutionKit with FilaKit CLI Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Alternative installation using the FilaKit CLI. Requires the FilaKit CLI to be installed globally via `composer global require jeffersongoncalves/filakit-cli`. ```bash filakit new my-app --kit=jeffersongoncalves/evolutionkitv4 ``` -------------------------------- ### Run automated installation script Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Runs the automated installation script. It installs Composer dependencies, sets up the environment file, generates the application key, sets up the database, runs migrations, installs Node.js dependencies, builds assets, and configures Herd if used. ```bash php install.php ``` -------------------------------- ### Install Composer dependencies Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Installs Composer dependencies. Part of the manual installation process. ```bash composer install ``` -------------------------------- ### Install JavaScript dependencies Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Installs JavaScript dependencies using PNPM. Part of the manual installation process. ```bash pnpm install ``` -------------------------------- ### Build frontend assets Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Builds frontend assets. Part of the manual installation process. ```bash pnpm run build ``` -------------------------------- ### Run database migrations Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Runs database migrations. Part of the manual installation process. ```bash php artisan migrate ``` -------------------------------- ### Start Sail containers Source: https://github.com/jeffersongoncalves/evolutionkitv4/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 ``` -------------------------------- ### Navigate to project directory Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Moves into the newly created project directory. ```bash cd my-app ``` -------------------------------- ### Publish config and run migrations Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Publishes the plugin's config 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 Source: https://github.com/jeffersongoncalves/evolutionkitv4/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/evolutionkitv4 --database=mysql ``` -------------------------------- ### Create Laravel app with EvolutionKit Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Creates a new Laravel application using the EvolutionKit starter kit template. Requires PHP 8.3+, Composer, Node.js, and PNPM. ```bash laravel new my-app --using=jeffersongoncalves/evolutionkitv4 ``` -------------------------------- ### Run development server and queues Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Development commands: `composer dev` runs the full development environment (server, queues, asset compilation). Alternatively, 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 ``` -------------------------------- ### Optional config/filament-evolution.php Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Optional configuration file for the plugin, allowing you to tune queues, storage, cleanup, instance defaults, and tenancy after publishing. ```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', ], ]; ``` -------------------------------- ### Configure custom ports in .env Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Environment variables to configure custom ports for the application, MySQL, Redis, and Mailpit. Adjust these if other services are 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 ``` -------------------------------- ### Generate application key Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Generates the application encryption key. ```bash php artisan key:generate ``` -------------------------------- ### Prefill SendWhatsappMessageAction from record Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Prefills the action's number and instance fields from attributes on the current record. ```php SendWhatsappMessageAction::make() ->numberFrom('phone') // attribute on the record ->instanceFrom('whatsapp_instance_id'); ``` -------------------------------- ### Media storage environment variables Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Optional environment variables for configuring media storage. You can also specify a custom disk per action with ->disk('s3'). ```env EVOLUTION_MEDIA_DISK=public EVOLUTION_MEDIA_DIRECTORY=whatsapp-media EVOLUTION_MEDIA_MAX_SIZE=16384 ``` -------------------------------- ### Run evolution:cleanup command Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Runs the cleanup command to remove old webhook and message records. Use --dry-run to preview deletions, or override the retention days with --webhooks-days and --messages-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/evolutionkitv4/blob/main/README.md Attaches to the application container to run commands inside it. ```bash ./vendor/bin/sail shell ``` -------------------------------- ### Schedule evolution:cleanup daily Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Schedules the cleanup command to run daily using Laravel's scheduler. ```php // routes/console.php use Illuminate\Support\Facades\Schedule; Schedule::command('evolution:cleanup')->daily(); ``` -------------------------------- ### Environment variables for Evolution API Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Environment variables required for the Evolution API connection and webhook configuration. The webhook URL must be publicly accessible and point to the plugin's endpoint. ```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 ``` -------------------------------- ### SendWhatsappMessageAction in UI actions Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Attaches the SendWhatsappMessageAction to a resource table or page header. The header action shows how to set default number and message values. ```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!'), ]; } ``` -------------------------------- ### Limit message types and hide fields Source: https://github.com/jeffersongoncalves/evolutionkitv4/blob/main/README.md Restricts the action to specific message types and hides the instance select and number input fields. The textOnly() method further limits input 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.