### Set up environment and generate application key Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Sets up the environment file by copying the example and generates the application key. Part of the manual installation process. ```bash cp .env.example .env php artisan key:generate ``` -------------------------------- ### Run the Laravel development server Source: https://github.com/jeffersongoncalves/teamkit/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/teamkit/blob/main/README.md Copies the example environment file to create the actual .env configuration file. ```bash cp .env.example .env ``` -------------------------------- ### Run automated installation script Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Runs the automated installation script that 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 Teamkit using FilaKit CLI Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Alternative installation using FilaKit CLI. Requires installing FilaKit CLI globally with `composer global require jeffersongoncalves/filakit-cli`. ```bash filakit new my-app --kit=jeffersongoncalves/teamkit ``` -------------------------------- ### Build frontend assets Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Builds frontend assets using PNPM. Part of the manual installation process. ```bash pnpm run build ``` -------------------------------- ### Install Composer dependencies Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Installs Composer dependencies for the Laravel application. Part of the manual installation process. ```bash composer install ``` -------------------------------- ### Install JavaScript dependencies with PNPM Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Installs JavaScript dependencies using PNPM. Part of the manual installation process. ```bash pnpm install ``` -------------------------------- ### Run database migrations Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Runs database migrations after configuring the database in the .env file. Part of the manual installation process. ```bash php artisan migrate ``` -------------------------------- ### Start Sail containers Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Starts the Laravel Sail containers in detached mode. You won't need to run `php artisan serve` because Sail handles the development server. ```bash ./vendor/bin/sail up -d ``` -------------------------------- ### Configure custom ports in .env Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Example environment variables for configuring custom ports in the .env file. Adjust these if you have other services running on the same 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 ``` -------------------------------- ### Apply tenant scope to model Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Example of applying a global scope to a model to filter by the current tenant. Uncomment and adapt the code to your model. The scope uses Filament::getTenant() to retrieve the current team. ```php // Example (uncomment and adapt): // SomeModel::addGlobalScope( // fn (Builder $query) => $query->whereBelongsTo(Filament::getTenant()), // ); ``` -------------------------------- ### Navigate to project directory Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Moves into the project directory created by the previous command. ```bash cd my-app ``` -------------------------------- ### Create a new Laravel project with Teamkit Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Creates a new Laravel application using the Teamkit starter kit with MySQL as the database. Requires PHP 8.3+, Composer, Node.js, and PNPM. ```bash laravel new my-app --using=jeffersongoncalves/teamkit --database=mysql ``` -------------------------------- ### Run development server with composer dev or individual commands Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Commands to run the development server. The first command runs the development server with logs, queues, and asset compilation. The second command runs each component separately: the Laravel development server, the queue listener with one retry attempt, and the frontend asset compilation. ```bash composer dev ``` ```bash php artisan serve php artisan queue:listen --tries=1 pnpm run dev ``` -------------------------------- ### Generate application key Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Generates the application encryption key. ```bash php artisan key:generate ``` -------------------------------- ### Attach to application container Source: https://github.com/jeffersongoncalves/teamkit/blob/main/README.md Attaches to the application container to run commands inside it. ```bash ./vendor/bin/sail shell ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.