### Setup Environment and Generate Keys Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/dusk.md Copies the .env file, installs Composer dependencies, generates an application key, and creates a Dusk-specific environment file with the APP_URL set. ```bash cp -v .env.example .env composer install --no-interaction --prefer-dist --optimize-autoloader php artisan key:generate # Dusk 환경 파일을 생성하고, APP_URL에 BUILD_HOST를 할당 cp -v .env .env.dusk.ci sed -i "s@APP_URL=.*@APP_URL=http://$BUILD_HOST:8000@g" .env.dusk.ci ``` -------------------------------- ### Install Dusk and ChromeDriver Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/dusk.md Run the dusk:install Artisan command to generate the tests directory, example Dusk tests, and the appropriate Chrome Driver binary for your operating system. ```shell php artisan dusk:install ``` -------------------------------- ### Install Broadcasting with Ably Option Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/broadcasting.md Use the install:broadcasting artisan command with the --ably option to automatically configure Ably. This command handles authentication, SDK installation, and .env variable setup. ```shell php artisan install:broadcasting --ably ``` -------------------------------- ### Install PHP with Homebrew Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/valet.md Install PHP using Homebrew as a prerequisite for Composer and Valet. ```shell brew install php ``` -------------------------------- ### Install Sanctum Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/sanctum.md Run the install:api Artisan command to install Sanctum. ```shell php artisan install:api ``` -------------------------------- ### Add Core AI Guidelines to a Package Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/boost.md Include this file in your package to automatically load AI guidelines when a user runs `php artisan boost:install`. Focus on a concise and practical description of your package's functionality, file structure, and feature usage with example code. ```php ## Package Name This package provides [brief description of functionality]. ### Features - Feature 1: [clear & short description]. - Feature 2: [clear & short description]. Example usage: @verbatim $result = PackageName::featureTwo($param1, $param2); @endverbatim ``` -------------------------------- ### Start Octane Server Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/octane.md Start the Octane server using the octane:start Artisan command. By default, it uses the server specified in the 'octane' configuration file. ```shell php artisan octane:start ``` -------------------------------- ### Install Laravel AI SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/ai-sdk.md Install the Laravel AI SDK using Composer. This command fetches and installs the necessary package files. ```shell composer require laravel/ai ``` -------------------------------- ### Start Reverb Server Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/reverb.md Run the Reverb server using the 'reverb:start' Artisan command. By default, it listens on 0.0.0.0:8080. ```shell php artisan reverb:start ``` -------------------------------- ### Install Resend PHP SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/mail.md Install Resend's PHP SDK using Composer to use the Resend driver. ```shell composer require resend/resend-php ``` -------------------------------- ### Install SFTP Driver Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/filesystem.md Install the necessary Composer package for SFTP driver support. ```shell composer require league/flysystem-sftp-v3 "^3.0" ``` -------------------------------- ### Install Ably PHP SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/broadcasting.md Manually install the Ably PHP SDK using Composer for Ably integration. ```shell composer require ably/ably-php ``` -------------------------------- ### Install Typesense PHP SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/scout.md Install the Typesense PHP SDK using Composer to integrate Typesense with Scout. ```shell composer require typesense/typesense-php ``` -------------------------------- ### Start Octane Server with File Watching Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/octane.md Automatically restart the Octane server when application files change during development. Ensure Node.js is installed and install the Chokidar library. ```shell php artisan octane:start --watch ``` ```shell npm install --save-dev chokidar ``` -------------------------------- ### Install Custom Starter Kit Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/starter-kits.md Install a community-maintained starter kit from Packagist using the `--using` flag with the `laravel new` command. ```shell laravel new my-app --using=example/starter-kit ``` -------------------------------- ### `boot` 메서드를 사용한 View Composer 등록 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/providers.md 서비스 프로바이더 내에서 View Composer와 같은 기능을 등록하려면 `boot` 메서드를 사용해야 합니다. 이 메서드는 다른 모든 서비스 프로바이더가 등록된 후에 호출됩니다. ```php Redis::get('user:profile:'.$id) ]); } } ``` -------------------------------- ### 설정 파일 퍼블리싱 (PHP) Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/packages.md 서비스 프로바이더의 boot 메서드에서 publishes 메서드를 사용하여 패키지의 설정 파일을 애플리케이션의 config 디렉터리로 퍼블리시합니다. 사용자는 vendor:publish 명령어로 이 파일을 복사할 수 있습니다. ```php /** * Bootstrap any package services. */ public function boot(): void { $this->publishes([ __DIR__.'/../config/courier.php' => config_path('courier.php'), ]); } ``` -------------------------------- ### Extract Substring Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/strings.md Use `substr` to get a portion of a string based on a starting position and an optional length. ```php use Illuminate\Support\Str; $string = Str::of('Laravel Framework')->substr(8); // Framework $string = Str::of('Laravel Framework')->substr(8, 5); // Frame ``` -------------------------------- ### Install Laravel AI SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/ai-sdk.md Install the SDK using Composer. Publish configuration and migration files, then run migrations to set up necessary database tables. ```shell composer require laravel/ai ``` ```shell php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider" ``` ```shell php artisan migrate ``` -------------------------------- ### Install Meilisearch SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/scout.md Install the Meilisearch PHP SDK and a PSR-17 HTTP factory implementation using Composer for the Meilisearch driver. ```shell composer require meilisearch/meilisearch-php http-interop/http-factory-guzzle ``` -------------------------------- ### Configure MongoDB Connection String Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/mongodb.md Set the MongoDB connection URI and database name in your .env file. This example shows a local MongoDB setup. ```ini MONGODB_URI="mongodb://localhost:27017" MONGODB_DATABASE="laravel_app" ``` -------------------------------- ### `boot` 메서드 내 의존성 주입 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/providers.md `boot` 메서드에서 필요한 의존성을 타입 힌트로 지정하여 서비스 컨테이너가 자동으로 주입하도록 할 수 있습니다. ```php use Illuminate\Contracts\Routing\ResponseFactory; /** * 애플리케이션 서비스 부트스트랩 */ public function boot(ResponseFactory $response): void { $response->macro('serialized', function (mixed $value) { // ... }); } ``` -------------------------------- ### Install Valet and Configure Services Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/valet.md This command installs Valet, configures DnsMasq, and sets up necessary daemons to run automatically on system boot. ```shell valet install ``` -------------------------------- ### 컨텍스트 비활성화 시 로케일 추가 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/context.md 작업이 큐에 디스패치될 때 컨텍스트 데이터를 비활성화하고, 현재 로케일 설정을 숨겨진 데이터로 추가합니다. 일반적으로 AppServiceProvider의 boot 메서드에서 등록합니다. ```php use Illuminate\Log\Context\Repository; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Context; /** * Bootstrap any application services. */ public function boot(): void { Context::dehydrating(function (Repository $context) { $context->addHidden('locale', Config::get('app.locale')); }); } ``` -------------------------------- ### Start Octane with File Watching Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/octane.md Use the --watch flag to automatically restart the Octane server when application files change. This requires Node.js and the Chokidar library installed. ```shell php artisan octane:start --watch ``` -------------------------------- ### Start Tinker REPL Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/artisan.md Enter the Tinker environment by running the 'tinker' Artisan command. ```shell php artisan tinker ``` -------------------------------- ### Start Asynchronous Process Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/processes.md Initiate a process asynchronously, allowing your application to continue executing other tasks while the process runs. Use `running` to check its status and `wait` to get the result. ```php $process = Process::timeout(120)->start('bash import.sh'); while ($process->running()) { // ... } $result = $process->wait(); ``` -------------------------------- ### Chipper CI Configuration for Dusk Tests Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/dusk.md Example configuration for running Dusk tests on Chipper CI. This setup specifies the PHP and Node.js versions and includes Dusk as a service. ```yaml # file .chipperci.yml version: 1 environment: php: 8.2 node: 16 # Include Chrome in the build environment services: - dusk ``` -------------------------------- ### Run Dusk Browser Tests Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/dusk.md Starts a local development server, downloads the Chrome driver, and executes Dusk tests using the CI environment configuration. ```bash php -S [::0]:8000 -t public 2>server.log & sleep 2 php artisan dusk:chrome-driver $CHROME_DRIVER php artisan dusk --env=ci ``` -------------------------------- ### Travis CI Configuration for Dusk Tests Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/dusk.md Configuration for running Dusk tests on Travis CI. This setup includes installing Chrome, setting up the environment, and executing Dusk tests. ```yaml language: php php: - 8.2 addons: chrome: stable install: - cp .env.testing .env - travis_retry composer install --no-interaction --prefer-dist - php artisan key:generate - php artisan dusk:chrome-driver before_script: - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - php artisan serve --no-reload & script: - php artisan dusk ``` -------------------------------- ### GitHub Actions Configuration for Dusk Tests Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/dusk.md A GitHub Actions workflow for running Dusk tests. It sets up the environment, installs dependencies, starts the Chrome driver and Laravel server, and executes Dusk tests. ```yaml name: CI on: [push] jobs: dusk-php: runs-on: ubuntu-latest env: APP_URL: "http://127.0.0.1:8000" DB_USERNAME: root DB_PASSWORD: root MAIL_MAILER: log steps: - uses: actions/checkout@v5 - name: Prepare The Environment run: cp .env.example .env - name: Create Database run: | sudo systemctl start mysql mysql --user="root" --password="root" -e "CREATE DATABASE \`my-database\` character set UTF8mb4 collate utf8mb4_bin;" - name: Install Composer Dependencies run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Generate Application Key run: php artisan key:generate - name: Upgrade Chrome Driver run: php artisan dusk:chrome-driver --detect - name: Start Chrome Driver run: ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515 & - name: Run Laravel Server run: php artisan serve --no-reload & - name: Run Dusk Tests run: php artisan dusk - name: Upload Screenshots if: failure() uses: actions/upload-artifact@v4 with: name: screenshots path: tests/Browser/screenshots - name: Upload Console Logs if: failure() uses: actions/upload-artifact@v4 with: name: console path: tests/Browser/console ``` -------------------------------- ### Publish Telescope Assets and Run Migrations Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/telescope.md After installing Telescope, publish its assets and run migrations to set up the necessary database tables. This prepares Telescope for use. ```shell php artisan telescope:install php artisan migrate ``` -------------------------------- ### Update Homestead via Composer Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/homestead.md If you installed Homestead using Composer, update your project's dependencies to get the latest Homestead version. Ensure your `composer.json` includes the correct version constraint for `laravel/homestead`. ```shell composer update ``` -------------------------------- ### bootstrap/app.php에서 스케줄 정의 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/scheduling.md `routes/console.php` 파일을 명령어 정의로만 사용하고 싶을 때, `bootstrap/app.php` 파일의 `withSchedule` 메서드를 사용하여 예약 작업을 정의할 수 있습니다. ```php use Illuminate\Console\Scheduling\Schedule; ->withSchedule(function (Schedule $schedule) { $schedule->call(new DeleteRecentUsers)->daily(); }) ``` -------------------------------- ### Implement AsJson Custom Cast Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/eloquent-mutators.md Implement the `CastsAttributes` interface to create a custom cast. The `get` method transforms raw database values, and the `set` method prepares values for storage. This example replicates the built-in `json` cast. ```php $attributes */ public function get( Model $model, string $key, mixed $value, array $attributes, ): array { return json_decode($value, true); } /** * Prepare the given value for storage. * * @param array $attributes */ public function set( Model $model, string $key, mixed $value, array $attributes, ): string { return json_encode($value); } } ``` -------------------------------- ### 장시간 쿼리 시 콜백 호출 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/database.md 한 요청 내에서 쿼리 수행 시간이 지정한 임계값을 초과할 경우 콜백 함수를 호출합니다. 성능 병목 지점을 파악하는 데 유용하며, 서비스 프로바이더의 `boot` 메서드에서 설정합니다. ```php server.log & sleep 2 php artisan dusk:chrome-driver $CHROME_DRIVER php artisan dusk --env=ci ``` -------------------------------- ### 패키지 라우트 로드 (PHP) Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/packages.md 서비스 프로바이더의 boot 메서드에서 loadRoutesFrom 메서드를 사용하여 패키지의 라우트 파일을 로드합니다. 이 방식은 라우트 캐싱 시에도 효율적입니다. ```php /** * Bootstrap any package services. */ public function boot(): void { $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); } ``` -------------------------------- ### 프로세스 풀 시작 및 실행 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/processes.md 클로저를 사용하여 프로세스 풀을 정의하고 시작합니다. `start` 메서드의 콜백은 각 프로세스의 출력 유형, 내용 및 키를 받습니다. `running` 메서드로 실행 중인 프로세스를 확인하고, `wait` 메서드로 모든 프로세스가 완료될 때까지 대기합니다. ```php use Illuminate\Process\Pool; use Illuminate\Support\Facades\Process; $pool = Process::pool(function (Pool $pool) { $pool->path(__DIR__)->command('bash import-1.sh'); $pool->path(__DIR__)->command('bash import-2.sh'); $pool->path(__DIR__)->command('bash import-3.sh'); })->start(function (string $type, string $output, int $key) { // ... }); while ($pool->running()->isNotEmpty()) { // ... } $results = $pool->wait(); ``` -------------------------------- ### 패키지 설치 시 기본 구성 파일 유지 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/homestead.md Ubuntu 패키지 설치 시 기본 구성 파일을 덮어쓰지 않고 유지하려면, `Dpkg::Options`를 사용하여 패키지를 설치합니다. ```shell sudo apt-get -y \ -o Dpkg::Options::="--force-confdef" \ -o Dpkg::Options::="--force-confold" \ install package-name ``` -------------------------------- ### Homestead 네트워크 인터페이스 설정 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/homestead.md `Homestead.yaml` 파일의 `networks` 속성을 사용하여 Homestead 가상 머신의 네트워크 인터페이스를 설정합니다. 필요한 만큼 인터페이스를 설정할 수 있습니다. ```yaml networks: - type: "private_network" ip: "192.168.10.20" ``` -------------------------------- ### Manage ChromeDriver Installations Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/dusk.md Use the dusk:chrome-driver Artisan command to install specific versions of ChromeDriver or to detect and install the version matching your Chrome/Chromium installation. ```shell php artisan dusk:chrome-driver php artisan dusk:chrome-driver 86 php artisan dusk:chrome-driver --all php artisan dusk:chrome-driver --detect ``` -------------------------------- ### Install Laravel Reverb Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/broadcasting.md Manually install Laravel Reverb using Composer. After installation, run the reverb:install command to publish configuration, add environment variables, and enable event broadcasting. ```shell composer require laravel/reverb ``` ```shell php artisan reverb:install ``` -------------------------------- ### Configure Site Sharing Tool Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/valet.md Before sharing a site, configure the desired sharing tool (`ngrok`, `expose`, or `cloudflared`) using the `share-tool` command. Valet will prompt for installation if the tool is not found. ```shell valet share-tool ngrok ``` -------------------------------- ### Ensure String Starts With a Prefix Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/strings.md Use `start` to prepend a given string to another string only if it doesn't already start with it. ```php use Illuminate\Support\Str; $adjusted = Str::of('this/string')->start('/'); // /this/string $adjusted = Str::of('/this/string')->start('/'); // /this/string ``` -------------------------------- ### Homestead.yaml에 추가 포트 포워딩 설정 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/homestead.md Homestead.yaml 파일의 ports 섹션을 사용하여 추가 포트를 Vagrant 박스로 포워딩합니다. 변경 사항 적용을 위해 `vagrant reload --provision`을 실행해야 합니다. ```yaml ports: - send: 50000 to: 5000 - send: 7777 to: 777 protocol: udp ``` -------------------------------- ### Install Laravel Folio Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/folio.md Install Folio using Composer and then run the folio:install Artisan command to register its service provider. ```shell composer require laravel/folio ``` ```shell php artisan folio:install ``` -------------------------------- ### Create Attachment Instances Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/mail.md Demonstrates creating attachment instances using `fromStorage`, `fromStorageDisk`, and `fromData`. These methods allow flexibility in specifying the source of the attachment. ```php // 기본 디스크에서 파일 첨부 생성 return Attachment::fromStorage($this->path); ``` ```php // 특정 디스크에서 파일 첨부 생성 return Attachment::fromStorageDisk('backblaze', $this->path); ``` ```php return Attachment::fromData(fn () => $this->content, 'Photo Name'); ``` -------------------------------- ### Configure Dusk Environment File Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/dusk.md Create a `.env.dusk.{environment}` file (e.g., `.env.dusk.local`) in the project root to force Dusk to use a specific environment configuration. Dusk automatically backs up and restores your original `.env` file during test execution. ```text .env.dusk.local ``` -------------------------------- ### 기본 GET 요청 보내기 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/http-client.md 다른 URL로 기본적인 GET 요청을 보냅니다. `get` 메서드는 `Illuminate\Http\Client\Response` 인스턴스를 반환합니다. ```php use Illuminate\Support\Facades\Http; $response = Http::get('http://example.com'); ``` -------------------------------- ### 쿼리 실행 이벤트 리스닝 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/database.md 애플리케이션의 모든 SQL 쿼리 실행 시마다 클로저를 호출하여 쿼리 로깅이나 디버깅에 활용할 수 있습니다. 서비스 프로바이더의 `boot` 메서드에서 등록합니다. ```php sql; // $query->bindings; // $query->time; // $query->toRawSql(); }); } } ``` -------------------------------- ### Install Predis Package Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/redis.md Install the Predis package using Composer if you cannot install the PhpRedis extension. This package provides a PHP-only Redis client. ```shell composer require predis/predis ``` -------------------------------- ### 컨텍스트 활성화 시 로케일 복원 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/context.md 큐에 디스패치된 작업이 실행될 때 컨텍스트 데이터를 활성화하고, 숨겨진 로케일 데이터를 사용하여 현재 로케일 설정을 복원합니다. 일반적으로 AppServiceProvider의 boot 메서드에서 등록합니다. ```php use Illuminate\Log\Context\Repository; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Context; /** * Bootstrap any application services. */ public function boot(): void { Context::hydrated(function (Repository $context) { if ($context->hasHidden('locale')) { Config::set('app.locale', $context->getHidden('locale')); } }); } ``` -------------------------------- ### Configure MCP Settings for GitHub Copilot (VS Code) Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/boost.md Start the Laravel Boost MCP server in GitHub Copilot (VS Code) by opening the command palette, selecting 'MCP: List Servers', choosing 'laravel-boost', and then 'Start server'. ```text 1. 명령 팔레트(`Cmd+Shift+P` 또는 `Ctrl+Shift+P`)를 엽니다 2. "MCP: List Servers"에서 `enter`를 누릅니다 3. `laravel-boost`를 화살표 키로 선택 후 `enter` 4. "Start server"를 선택합니다 ``` -------------------------------- ### Install Telescope for Local Development Only Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/telescope.md Install Telescope using the --dev flag for local development environments only. This prevents Telescope from being installed in production. ```shell composer require laravel/telescope --dev php artisan telescope:install php artisan migrate ``` -------------------------------- ### Install Laravel MongoDB Package Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/mongodb.md Use Composer to install the official Laravel MongoDB package. Ensure the mongodb PHP extension is installed first. ```shell composer require mongodb/laravel-mongodb ``` -------------------------------- ### Start Pail Log Tailing Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/logging.md Begin real-time log monitoring by running the 'pail' Artisan command. Use Ctrl+C to stop. ```shell php artisan pail ``` -------------------------------- ### Install Pusher PHP Server SDK Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/broadcasting.md Manually install the Pusher Channels PHP SDK using Composer if you are not using the automated installation command. ```shell composer require pusher/pusher-php-server ``` -------------------------------- ### Install Laravel Scout Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/scout.md Install the Scout package using Composer. After installation, publish the Scout configuration file using the vendor:publish Artisan command. ```shell composer require laravel/scout ``` ```shell php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider" ``` -------------------------------- ### Run Database Migrations Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/cashier-paddle.md Execute database migrations to create tables for customers, subscriptions, and transactions. ```shell php artisan migrate ``` -------------------------------- ### Start Reverb Server with Custom Host and Port Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/reverb.md Specify a custom host and port for the Reverb server using the --host and --port options. ```shell php artisan reverb:start --host=127.0.0.1 --port=9000 ``` -------------------------------- ### start Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/strings.md Prepends a string if it does not already start with the given value. ```APIDOC ## `start` ### Description Prepends a string if it does not already start with the given value. ### Method `start(string $prefix)` ### Example ```php use Illuminate\Support\Str; $adjusted = Str::of('this/string')->start('/'); // '/this/string' $adjusted = Str::of('/this/string')->start('/'); // '/this/string' ``` ``` -------------------------------- ### Register Site Directory with Valet Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/valet.md Use the `park` command to register a directory with Valet. All subdirectories within the parked directory will then be accessible via `http://.test`. ```shell cd ~/Sites valet park ``` -------------------------------- ### Install Sanctum Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/sanctum.md Install Laravel Sanctum using the Artisan command. ```APIDOC ## Install Sanctum Use the `install:api` Artisan command to install Laravel Sanctum. ```shell php artisan install:api ``` ``` -------------------------------- ### Install Laravel Pennant Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/pennant.md Install the Pennant package using Composer. ```shell composer require laravel/pennant ``` -------------------------------- ### Install Laravel Octane Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/octane.md Install the Octane package using Composer. ```shell composer require laravel/octane ``` -------------------------------- ### 병렬 테스트 실행 (Artisan) Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/master/ko/testing.md Artisan의 `test` 명령어에 `--parallel` 옵션을 추가하여 병렬 테스트 실행을 활성화합니다. 기본적으로 컴퓨터의 CPU 코어 개수만큼 프로세스가 생성됩니다. ```shell php artisan test --parallel ``` -------------------------------- ### Install Laravel MCP Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/mcp.md Install the Laravel MCP package using Composer. ```shell composer require laravel/mcp ``` -------------------------------- ### 사용자 정의 세션 드라이버 등록 Source: https://github.com/kimchanhyung98/laravel-docs-source/blob/main/12.x/ko/session.md 서비스 프로바이더의 `boot` 메서드에서 `Session::extend`를 호출하여 사용자 정의 세션 드라이버를 등록합니다. 첫 번째 인수는 드라이버 이름이고, 두 번째 인수는 드라이버 구현체를 반환하는 클로저입니다. ```php