### Install Dependencies and Start Server Source: https://laravel.com/framework/docs/starter-kits Navigate to the project directory, install frontend dependencies, and start the development server. ```bash cd my-app npm install && npm run build composer run dev ``` -------------------------------- ### Install Telescope for Local Development Only Source: https://laravel.com/framework/docs/telescope Install Telescope as a development dependency and initialize it. ```bash composer require laravel/telescope --dev php artisan telescope:install php artisan migrate ``` -------------------------------- ### Install PHP, Composer, and Laravel Installer Source: https://laravel.com/framework/docs/installation Commands to install necessary dependencies on different operating systems. ```bash 1/bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.5)" /bin/bash -c "$(curl -fsSL https://php.new/install/mac/8.5)" ``` ```powershell 1# Run as administrator... 2Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.5')) # Run as administrator... Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://php.new/install/windows/8.5')) ``` ```bash 1/bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.5)" /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.5)" ``` -------------------------------- ### Install with Devcontainer Support Source: https://laravel.com/framework/docs/sail Publish a default .devcontainer/devcontainer.json file during the installation process. ```bash php artisan sail:install --devcontainer ``` -------------------------------- ### Install PHP via Homebrew Source: https://laravel.com/framework/docs/valet Install PHP using Homebrew as a prerequisite for Valet. ```bash brew install php ``` -------------------------------- ### Install Valet Services Source: https://laravel.com/framework/docs/valet Configure and install Valet and DnsMasq, setting up daemons to launch on system startup. ```bash valet install ``` -------------------------------- ### Install Supervisor on Ubuntu Source: https://laravel.com/framework/docs/horizon Use the package manager to install the Supervisor process monitor. ```bash sudo apt-get install supervisor ``` -------------------------------- ### Install frontend dependencies Source: https://laravel.com/framework/docs/vite Install the application's frontend dependencies defined in package.json. ```bash npm install ``` -------------------------------- ### Installing React helpers Source: https://laravel.com/framework/docs/precognition Install the necessary NPM package to use Precognition with React. ```bash npm install laravel-precognition-react ``` -------------------------------- ### Install Community Starter Kit Source: https://laravel.com/framework/docs/starter-kits Use the --using flag with the Laravel installer to scaffold an application from a Packagist package. ```bash laravel new my-app --using=example/starter-kit ``` -------------------------------- ### Install Resend Driver Source: https://laravel.com/framework/docs/mail Install the Resend PHP SDK via Composer. ```bash composer require resend/resend-php ``` -------------------------------- ### Initialize Dusk Source: https://laravel.com/framework/docs/dusk Run the installation command to generate the necessary test directory and install the default Chrome Driver. ```bash php artisan dusk:install ``` -------------------------------- ### Install Laravel Installer Source: https://laravel.com/framework/docs/starter-kits Install the Laravel CLI tool globally using Composer. ```bash composer global require laravel/installer ``` -------------------------------- ### Manually Install Reverb Source: https://laravel.com/framework/docs/broadcasting Manual installation steps for the Reverb package and its configuration. ```bash composer require laravel/reverb ``` ```bash php artisan reverb:install ``` -------------------------------- ### Install Typesense PHP SDK Source: https://laravel.com/framework/docs/scout Install the Typesense PHP SDK via Composer. ```bash composer require typesense/typesense-php ``` -------------------------------- ### Manually Install Pusher Source: https://laravel.com/framework/docs/broadcasting Manual installation of the Pusher PHP SDK. ```bash composer require pusher/pusher-php-server ``` -------------------------------- ### Install Meilisearch PHP SDK Source: https://laravel.com/framework/docs/scout Install the Meilisearch PHP SDK and the required HTTP factory. ```bash composer require meilisearch/meilisearch-php http-interop/http-factory-guzzle ``` -------------------------------- ### Install Laravel Installer via Composer Source: https://laravel.com/framework/docs/installation Alternative method to install the Laravel installer if PHP and Composer are already present. ```bash 1composer global require laravel/installer composer global require laravel/installer ``` -------------------------------- ### Install Chokidar for Horizon Listen Source: https://laravel.com/framework/docs/horizon Installs the required file-watching library for the horizon:listen command. ```bash npm install --save-dev chokidar ``` -------------------------------- ### Start the Reverb Server Source: https://laravel.com/framework/docs/reverb Starts the Reverb server using the default host and port settings. ```bash php artisan reverb:start ``` -------------------------------- ### Setup PHP Environment Source: https://laravel.com/framework/docs/envoy Use @setup to define PHP variables or @include to load external PHP files before task execution. ```blade @setup $now = new DateTime; @endsetup ``` ```blade @include('vendor/autoload.php') @task('restart-queues') # ... @endtask ``` -------------------------------- ### Example Database URL Source: https://laravel.com/framework/docs/database A sample connection string containing credentials and host information. ```text mysql://root:password@127.0.0.1/forge?charset=UTF-8 ``` -------------------------------- ### Install Open Swoole Extension Source: https://laravel.com/framework/docs/octane Install the Open Swoole PHP extension using PECL. ```bash pecl install openswoole ``` -------------------------------- ### Start Horizon Source: https://laravel.com/framework/docs/horizon Starts all configured worker processes for the current environment. ```bash php artisan horizon ``` -------------------------------- ### Install Ably PHP SDK Source: https://laravel.com/framework/docs/broadcasting Manually install the Ably PHP SDK using Composer. ```bash composer require ably/ably-php ``` -------------------------------- ### Install Valet via Composer Source: https://laravel.com/framework/docs/valet Install Laravel Valet as a global Composer package. ```bash composer global require laravel/valet ``` -------------------------------- ### Install Swoole Extension Source: https://laravel.com/framework/docs/octane Install the Swoole PHP extension using PECL. ```bash pecl install swoole ``` -------------------------------- ### Enter Tinker Environment Source: https://laravel.com/framework/docs/artisan Starts the interactive Tinker REPL shell. ```bash php artisan tinker ``` -------------------------------- ### Start the Octane server Source: https://laravel.com/framework/docs/octane Initiates the Octane server using the default configuration settings. ```bash php artisan octane:start ``` -------------------------------- ### Install Laravel Prompts Source: https://laravel.com/framework/docs/prompts Use Composer to add the package to a PHP project. ```bash composer require laravel/prompts ``` -------------------------------- ### Nested Resource URI Example Source: https://laravel.com/framework/docs/controllers Example URI structure for a nested resource. ```text /photos/{photo}/comments/{comment} ``` -------------------------------- ### Example Project Directory Structure Source: https://laravel.com/framework/docs/vite A sample directory layout illustrating the location of public assets versus source assets. ```text public/ taylor.png resources/ js/ Pages/ Welcome.vue images/ abigail.png ``` -------------------------------- ### Install Pusher Broadcasting Source: https://laravel.com/framework/docs/broadcasting Automated command to install Pusher SDKs and configure credentials. ```bash php artisan install:broadcasting --pusher ``` -------------------------------- ### Install ext-uv extension Source: https://laravel.com/framework/docs/reverb Install the ext-uv extension via PECL to enable a high-performance event loop for handling more than 1,000 concurrent connections. ```bash pecl install uv ``` -------------------------------- ### Run Laravel Boost Installer Source: https://laravel.com/framework/docs/ai Execute the interactive installer to configure IDE and AI agent integrations. ```bash php artisan boost:install ``` -------------------------------- ### Install Postmark Driver Source: https://laravel.com/framework/docs/mail Install the required Symfony Postmark transport and HTTP client via Composer. ```bash composer require symfony/postmark-mailer symfony/http-client ``` -------------------------------- ### Run Vite development and build commands Source: https://laravel.com/framework/docs/vite Use these commands to start the development server or bundle assets for production. ```bash # Run the Vite development server... npm run dev # Build and version the assets for production... npm run build ``` -------------------------------- ### Build and start SSR server Source: https://laravel.com/framework/docs/vite Commands to compile the assets and execute the SSR server. ```bash npm run build node bootstrap/ssr/ssr.js ``` -------------------------------- ### Start Sail Containers Source: https://laravel.com/framework/docs/sail Commands to start the Docker containers defined in the compose.yaml file. ```bash sail up ``` ```bash sail up -d ``` -------------------------------- ### Install Algolia PHP SDK Source: https://laravel.com/framework/docs/scout Install the required Algolia PHP SDK via Composer. ```bash composer require algolia/algoliasearch-client-php ``` -------------------------------- ### Start Supervisor Processes Source: https://laravel.com/framework/docs/horizon Update the Supervisor configuration and start the monitored Horizon process. ```bash sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start horizon ``` -------------------------------- ### Start Vite development server Source: https://laravel.com/framework/docs/vite Run the development server for both Laravel and Vite. ```bash composer run dev ``` -------------------------------- ### Install Flysystem Path Prefixing Source: https://laravel.com/framework/docs/filesystem Install the required package via Composer before using the scoped filesystem driver. ```bash composer require league/flysystem-path-prefixing "^3.0" ``` -------------------------------- ### Defining an asynchronous process route Source: https://laravel.com/framework/docs/processes An example route that interacts with an asynchronous process using the start method. ```php use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Route; Route::get('/import', function () { $process = Process::start('bash import.sh'); while ($process->running()) { Log::info($process->latestOutput()); Log::info($process->latestErrorOutput()); } return 'Done'; }); ``` -------------------------------- ### Publish Telescope Assets and Run Migrations Source: https://laravel.com/framework/docs/telescope Initialize Telescope assets and create the necessary database tables. ```bash php artisan telescope:install php artisan migrate ``` -------------------------------- ### Display Application Overview Source: https://laravel.com/framework/docs/configuration Use the about command to view configuration, drivers, and environment details. ```bash php artisan about ``` -------------------------------- ### Retrieve attributes by prefix Source: https://laravel.com/framework/docs/blade Use whereStartsWith to get attributes starting with a specific string, or whereDoesntStartWith to exclude them. ```blade {{ $attributes->whereStartsWith('wire:model') }} ``` ```blade {{ $attributes->whereDoesntStartWith('wire:model') }} ``` -------------------------------- ### Start Reverb with SSL Source: https://laravel.com/framework/docs/reverb Start the Reverb server with a specific hostname to enable secure WebSocket connections. ```bash php artisan reverb:start --host="0.0.0.0" --port=8080 --hostname="laravel.test" ``` -------------------------------- ### Enable Octane File Watching Source: https://laravel.com/framework/docs/octane Start the Octane server with the watch flag to automatically restart on file changes. Requires the Chokidar library installed via npm. ```bash php artisan octane:start --watch ``` ```bash npm install --save-dev chokidar ``` -------------------------------- ### Start Sail Source: https://laravel.com/framework/docs/sail Launch the Docker containers defined in the project's compose.yaml file. ```bash ./vendor/bin/sail up ``` -------------------------------- ### Create Setup Intent in Laravel Controller Source: https://laravel.com/framework/docs/billing Pass a new Setup Intent to the view to initialize the payment collection process. ```php return view('subscribe', [ 'intent' => $user->createSetupIntent() ]); ``` -------------------------------- ### Enable Broadcasting via Artisan Source: https://laravel.com/framework/docs/broadcasting Run this command to install the necessary configuration files and set up the broadcasting service. ```bash php artisan install:broadcasting ``` -------------------------------- ### Install React Vite Plugin Source: https://laravel.com/framework/docs/vite Install the required React plugin for Vite via npm. ```bash npm install --save-dev @vitejs/plugin-react ``` -------------------------------- ### Install Svelte Vite Plugin Source: https://laravel.com/framework/docs/vite Install the required Svelte plugin for Vite via npm. ```bash npm install --save-dev @sveltejs/vite-plugin-svelte ``` -------------------------------- ### Create New Laravel Application Source: https://laravel.com/framework/docs/starter-kits Initialize a new project using the Laravel installer, which will prompt for starter kit selection. ```bash laravel new my-app ``` -------------------------------- ### Install Tinker Source: https://laravel.com/framework/docs/artisan Installs the Laravel Tinker package via Composer. ```bash composer require laravel/tinker ``` -------------------------------- ### Install and Run Parallel Tests Source: https://laravel.com/framework/docs/testing Install the required dev dependency and execute the test command with the parallel flag. ```bash composer require brianium/paratest --dev php artisan test --parallel ``` -------------------------------- ### Install Dropbox Adapter Source: https://laravel.com/framework/docs/filesystem Use Composer to add the community-maintained Dropbox adapter to your project. ```bash composer require spatie/flysystem-dropbox ``` -------------------------------- ### React Starter Kit Directory Structure Source: https://laravel.com/framework/docs/starter-kits Overview of the primary frontend directory structure located in resources/js. ```text resources/js/ ├── components/ # Reusable React components ├── hooks/ # React hooks ├── layouts/ # Application layouts ├── lib/ # Utility functions and configuration ├── pages/ # Page components └── types/ # TypeScript definitions ``` -------------------------------- ### Install Ably via Artisan Source: https://laravel.com/framework/docs/broadcasting Use the Artisan command to automatically install dependencies and configure environment variables for Ably. ```bash php artisan install:broadcasting --ably ``` -------------------------------- ### Install Laravel Telescope Source: https://laravel.com/framework/docs/telescope Use Composer to add the Telescope package to your project. ```bash composer require laravel/telescope ``` -------------------------------- ### Regenerating the Homestead virtual machine Source: https://laravel.com/framework/docs/homestead Start the virtual machine to apply the latest updates. ```bash vagrant up ``` -------------------------------- ### Install FrankenPHP Binary via Sail Source: https://laravel.com/framework/docs/octane Use the Artisan command within Sail to install the FrankenPHP server binary. ```bash ./vendor/bin/sail artisan octane:install --server=frankenphp ``` -------------------------------- ### Start Inertia SSR server Source: https://laravel.com/framework/docs/vite Use the Artisan command to start the SSR server when using Inertia. ```bash php artisan inertia:start-ssr ``` -------------------------------- ### Install SRI Plugin Source: https://laravel.com/framework/docs/vite Install the vite-plugin-manifest-sri package to enable integrity hash generation in the Vite manifest. ```bash npm install --save-dev vite-plugin-manifest-sri ``` -------------------------------- ### Install Laravel Boost Source: https://laravel.com/framework/docs/ai Install the package as a development dependency in your Laravel project. ```bash composer require laravel/boost --dev ``` -------------------------------- ### PHPDoc Annotation Example Source: https://laravel.com/framework/docs/pint Example of code that would be processed by the Pint/phpdoc_type_annotations_only rule. ```php /** * Get the posts for the user. * * @return HasMany */ public function posts(): HasMany ``` -------------------------------- ### Handle Subscription Completion Route Source: https://laravel.com/framework/docs/billing Retrieve the setup intent after redirection and finalize the subscription creation. ```php use Illuminate\Http\Request; Route::get('/subscription/complete', function (Request $request) { $setupIntent = $request->user()->findSetupIntent( $request->setup_intent ); $paymentMethod = $setupIntent->payment_method; $request->user() ->newSubscription('default', 'price_xxx') ->create($paymentMethod); return redirect('/dashboard'); })->name('subscription.complete'); ``` -------------------------------- ### Install Vue Vite plugin Source: https://laravel.com/framework/docs/vite Install the required plugin to support Vue within the Vite build process. ```bash npm install --save-dev @vitejs/plugin-vue ``` -------------------------------- ### Install fontaine dependency Source: https://laravel.com/framework/docs/vite Install the fontaine package as a development dependency to enable metric-adjusted fallback font generation. ```bash npm install --save-dev fontaine ``` -------------------------------- ### Install AWS SDK for DynamoDB Source: https://laravel.com/framework/docs/cache Install the required AWS SDK package via Composer to enable DynamoDB communication. ```bash composer require aws/aws-sdk-php ``` -------------------------------- ### Initialize Octane Configuration Source: https://laravel.com/framework/docs/octane Run the Artisan command to publish the Octane configuration file. ```bash php artisan octane:install ``` -------------------------------- ### Install Laravel Sail Source: https://laravel.com/framework/docs/sail Install the Sail package as a development dependency using Composer. ```bash composer require laravel/sail --dev ``` -------------------------------- ### Install Laravel Sanctum Source: https://laravel.com/framework/docs/sanctum Use the Artisan command to install Sanctum into your Laravel application. ```bash php artisan install:api ``` -------------------------------- ### Example of Rewritten Asset URL Source: https://laravel.com/framework/docs/vite Shows how assets are prefixed after configuring the ASSET_URL. ```text https://cdn.example.com/build/assets/app.9dce8d17.js ``` -------------------------------- ### Initialize Homestead Configuration Source: https://laravel.com/framework/docs/homestead Generate the Homestead.yaml file for your environment. ```bash # macOS / Linux... bash init.sh # Windows... init.bat ``` -------------------------------- ### Install Laravel Pail Source: https://laravel.com/framework/docs/logging Install the Pail package as a development dependency via Composer. ```bash composer require --dev laravel/pail ``` -------------------------------- ### Tail Application Logs Source: https://laravel.com/framework/docs/logging Commands to start tailing logs with varying levels of verbosity. ```bash php artisan pail ``` ```bash php artisan pail -v ``` ```bash php artisan pail -vv ``` -------------------------------- ### Create and Run a New Laravel Application Source: https://laravel.com/framework/docs/installation Commands to scaffold a new project and start the development environment. ```bash 1laravel new example-app laravel new example-app ``` ```bash 1cd example-app 2npm install && npm run build 3composer run dev cd example-app npm install && npm run build composer run dev ``` -------------------------------- ### Install Reverb Broadcasting Source: https://laravel.com/framework/docs/broadcasting Automated command to install Reverb and configure environment variables. ```bash php artisan install:broadcasting --reverb ``` -------------------------------- ### Start Octane with Custom Caddyfile Source: https://laravel.com/framework/docs/octane Command to initiate the Octane server using a specific Caddyfile path. ```bash php artisan octane:start --server=frankenphp --caddyfile=/path/to/your/Caddyfile ``` -------------------------------- ### Install Laravel Envoy Source: https://laravel.com/framework/docs/envoy Install the Envoy package via Composer as a development dependency. ```bash composer require laravel/envoy --dev ``` -------------------------------- ### Create a Browser Test Source: https://laravel.com/framework/docs/dusk Use the browse method to initialize a browser instance and perform interactions like visiting pages, typing input, and asserting paths. ```php use(DatabaseMigrations::class); test('basic example', function () { $user = User::factory()->create([ 'email' => 'taylor@laravel.com', ]); $this->browse(function (Browser $browser) use ($user) { $browser->visit('/login') ->type('email', $user->email) ->type('password', 'password') ->press('Login') ->assertPathIs('/home'); }); }); ``` ```php create([ 'email' => 'taylor@laravel.com', ]); $this->browse(function (Browser $browser) use ($user) { $browser->visit('/login') ->type('email', $user->email) ->type('password', 'password') ->press('Login') ->assertPathIs('/home'); }); } } ``` -------------------------------- ### Create a PKCE-enabled client Source: https://laravel.com/framework/docs/passport Use the Artisan command to generate a public client suitable for PKCE flows. ```bash php artisan passport:client --public ``` -------------------------------- ### Install Alpine Precognition helper Source: https://laravel.com/framework/docs/precognition Install the necessary NPM package to use Precognition with Alpine.js. ```bash npm install laravel-precognition-alpine ``` -------------------------------- ### Installing Vue Precognition Helpers Source: https://laravel.com/framework/docs/precognition Install the necessary NPM package to integrate Precognition with Vue. ```bash npm install laravel-precognition-vue ``` -------------------------------- ### Run Database Migrations Source: https://laravel.com/framework/docs/cashier-paddle Execute the migrations to create the required tables for customers, subscriptions, and transactions. ```bash php artisan migrate ``` -------------------------------- ### Start local development processes Source: https://laravel.com/framework/docs/artisan Run the dev command to concurrently execute the PHP server, queue worker, log tailing, and asset compilation. ```bash php artisan dev ``` -------------------------------- ### Vue Starter Kit Directory Structure Source: https://laravel.com/framework/docs/starter-kits The standard directory layout for frontend code in the Vue starter kit. ```text resources/js/ ├── components/ # Reusable Vue components ├── composables/ # Vue composables / hooks ├── layouts/ # Application layouts ├── lib/ # Utility functions and configuration ├── pages/ # Page components └── types/ # TypeScript definitions ``` -------------------------------- ### Install Passkeys JavaScript Package Source: https://laravel.com/framework/docs/fortify Install the official Laravel passkeys package via npm. ```bash npm install @laravel/passkeys ``` -------------------------------- ### Check Node and NPM versions Source: https://laravel.com/framework/docs/vite Verify that Node.js 16+ and NPM are installed on your system. ```bash node -v npm -v ``` -------------------------------- ### Start the Reverb Server with Custom Host and Port Source: https://laravel.com/framework/docs/reverb Overrides the default host and port settings using command-line options. ```bash php artisan reverb:start --host=127.0.0.1 --port=9000 ``` -------------------------------- ### Install Intervention Image Source: https://laravel.com/framework/docs/images Command to install the required Intervention Image package via Composer. ```bash composer require intervention/image:^4.0 ``` -------------------------------- ### Run Folio installation command Source: https://laravel.com/framework/docs/folio Execute the Artisan command to register the Folio service provider. ```bash php artisan folio:install ``` -------------------------------- ### Start Development Server with SSR Source: https://laravel.com/framework/docs/starter-kits Run the development server and Inertia SSR server simultaneously for local testing. ```bash composer dev:ssr ``` -------------------------------- ### Livewire Starter Kit Directory Structure Source: https://laravel.com/framework/docs/starter-kits Displays the organization of the resources/views directory in a Livewire starter kit application. ```text resources/views ├── components # Reusable components ├── flux # Customized Flux components ├── layouts # Application layouts ├── pages # Livewire pages ├── partials # Reusable Blade partials ├── dashboard.blade.php # Authenticated user dashboard ├── welcome.blade.php # Guest user welcome page ``` -------------------------------- ### Example of uncorrected plugin output Source: https://laravel.com/framework/docs/vite The output generated by plugins like vite-imagetools before manual URL correction. ```html ``` -------------------------------- ### Install Slack Notification Channel Source: https://laravel.com/framework/docs/notifications Use Composer to install the required Slack notification channel package. ```bash composer require laravel/slack-notification-channel ``` -------------------------------- ### Configure Xdebug for Autostart Source: https://laravel.com/framework/docs/homestead Add these settings to the Xdebug configuration file inside the virtual machine to force debugging on every request. ```ini xdebug.client_host = 192.168.10.1 xdebug.mode = debug xdebug.start_with_request = yes ``` -------------------------------- ### Install Mailgun Driver Source: https://laravel.com/framework/docs/mail Install the required Symfony Mailgun transport and HTTP client via Composer. ```bash composer require symfony/mailgun-mailer symfony/http-client ``` -------------------------------- ### Show Configuration Values Source: https://laravel.com/framework/docs/configuration Inspect the values of a specific configuration file. ```bash php artisan config:show database ``` -------------------------------- ### Install Laravel Pint Source: https://laravel.com/framework/docs/pint Install the package as a development dependency via Composer for older Laravel applications. ```bash composer require laravel/pint --dev ``` -------------------------------- ### Update Boost with Discovery Source: https://laravel.com/framework/docs/boost Scan the application for newly installed packages and offer to publish their corresponding guidelines and skills. ```bash php artisan boost:update --discover ``` -------------------------------- ### Install Dompdf Library Source: https://laravel.com/framework/docs/billing Use Composer to install the Dompdf library, which is required for generating invoice PDFs. ```bash composer require dompdf/dompdf ``` -------------------------------- ### Disable Vite Globally in Tests Source: https://laravel.com/framework/docs/vite Call withoutVite in the setUp method of the base TestCase class to disable Vite for all tests. ```php withoutVite(); } } ``` -------------------------------- ### Install Laravel MongoDB Package Source: https://laravel.com/framework/docs/mongodb Use Composer to install the official MongoDB integration package for Laravel. ```bash composer require mongodb/laravel-mongodb ``` -------------------------------- ### Create a Custom Skill File Path Source: https://laravel.com/framework/docs/boost Example path structure for a custom skill named 'creating-invoices'. ```text 1.ai/skills/creating-invoices/SKILL.md .ai/skills/creating-invoices/SKILL.md ``` -------------------------------- ### Install Flysystem Read-Only Source: https://laravel.com/framework/docs/filesystem Install the required package via Composer before enabling read-only mode on a disk. ```bash composer require league/flysystem-read-only "^3.0" ``` -------------------------------- ### Share a local site Source: https://laravel.com/framework/docs/valet Navigate to the project directory and execute the share command to generate a public URL. ```bash cd ~/Sites/laravel valet share ``` -------------------------------- ### Create a new Laravel package Source: https://laravel.com/framework/docs/packages Use the Laravel installer CLI to generate a new package skeleton with necessary tooling. ```bash laravel package my-package ``` -------------------------------- ### Cursor Pagination URL Example Source: https://laravel.com/framework/docs/pagination Example of a URL containing an encoded cursor string for pagination state. ```text http://localhost/users?cursor=eyJpZCI6MTUsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0 ``` -------------------------------- ### Make a GET request Source: https://laravel.com/framework/docs/http-client Use the Http facade to perform a basic GET request to a specified URL. ```php use Illuminate\Support\Facades\Http; $response = Http::get('http://example.com'); ``` -------------------------------- ### Generate Vagrantfile and Homestead.yaml Source: https://laravel.com/framework/docs/homestead Run the make command to initialize Homestead configuration files within the project root. ```bash # macOS / Linux... php vendor/bin/homestead make # Windows... vendor\bin\homestead make ``` -------------------------------- ### Create a Vector Store Source: https://laravel.com/framework/docs/ai-sdk Use the Stores facade to initialize a new vector store, optionally specifying metadata like description and expiration. ```php use Laravel\Ai\Stores; // Create a new vector store... $store = Stores::create('Knowledge Base'); // Create a store with additional options... $store = Stores::create( name: 'Knowledge Base', description: 'Documentation and reference materials.', expiresWhenIdleFor: days(30), ); return $store->id; ``` -------------------------------- ### Install Laravel Stream Packages Source: https://laravel.com/framework/docs/responses Install the appropriate package for your frontend framework to consume Laravel event streams. ```bash npm install @laravel/stream-react ``` ```bash npm install @laravel/stream-vue ``` ```bash npm install @laravel/stream-svelte ``` -------------------------------- ### Publish Fortify Resources Source: https://laravel.com/framework/docs/fortify Run the Artisan command to publish configuration, actions, and migrations. ```bash php artisan fortify:install ``` -------------------------------- ### Install Predis Package Source: https://laravel.com/framework/docs/redis Use this command to install the Predis library via Composer if the PhpRedis extension is unavailable. ```bash composer require predis/predis ``` -------------------------------- ### Mount Stripe Payment Element in Frontend Source: https://laravel.com/framework/docs/billing Initialize the Stripe Payment Element and handle the setup confirmation on the client side. ```html
``` -------------------------------- ### Install Octane and RoadRunner in Sail Source: https://laravel.com/framework/docs/octane Commands to install necessary dependencies for RoadRunner within a Laravel Sail environment. ```bash ./vendor/bin/sail up ./vendor/bin/sail composer require laravel/octane spiral/roadrunner-cli spiral/roadrunner-http ``` -------------------------------- ### Manage ChromeDriver Versions Source: https://laravel.com/framework/docs/dusk Use these commands to install specific versions of ChromeDriver or match the version to your installed browser. ```bash # Install the latest version of ChromeDriver for your OS... php artisan dusk:chrome-driver # Install a given version of ChromeDriver for your OS... php artisan dusk:chrome-driver 86 # Install a given version of ChromeDriver for all supported OSs... php artisan dusk:chrome-driver --all # Install the version of ChromeDriver that matches the detected version of Chrome / Chromium for your OS... php artisan dusk:chrome-driver --detect ``` -------------------------------- ### Handle Real-time Output with Closures Source: https://laravel.com/framework/docs/processes Pass a closure to the start method to process output as it is generated. ```php $process = Process::start('bash import.sh', function (string $type, string $output) { echo $output; }); $result = $process->wait(); ``` -------------------------------- ### Install MongoDB PHP Extension Source: https://laravel.com/framework/docs/mongodb Install the required PHP extension via PECL if it is not already present in your environment. ```bash pecl install mongodb ``` -------------------------------- ### Schedule Task with Frequency and Constraints Source: https://laravel.com/framework/docs/scheduling Example demonstrating how to chain frequency methods with day-of-week and time-range constraints. ```php use Illuminate\Support\Facades\Schedule; // Run once per week on Monday at 1 PM... Schedule::call(function () { // ... })->weekly()->mondays()->at('13:00'); // Run hourly from 8 AM to 5 PM on weekdays... Schedule::command('foo') ->weekdays() ->hourly() ->timezone('America/Chicago') ->between('8:00', '17:00'); ``` -------------------------------- ### Create a Personal Access Client Source: https://laravel.com/framework/docs/passport Use this Artisan command to generate a personal access client if you have not already run the passport:install command. ```bash php artisan passport:client --personal ``` -------------------------------- ### Install Laravel Echo and Pusher JS Source: https://laravel.com/framework/docs/broadcasting Install the necessary dependencies for Echo and the Pusher protocol used by Reverb. ```bash npm install --save-dev laravel-echo pusher-js ``` -------------------------------- ### Apply audio instructions Source: https://laravel.com/framework/docs/ai-sdk Provide dynamic instructions to influence the tone or style of the generated audio. ```php $audio = Audio::of('I love coding with Laravel.') ->female() ->instructions('Said like a pirate') ->generate(); ``` -------------------------------- ### Configure Echo instance Source: https://laravel.com/framework/docs/broadcasting Initialize the Echo instance in your frontend application. Choose the implementation matching your framework. ```javascript import Echo from 'laravel-echo'; import Pusher from 'pusher-js'; window.Pusher = Pusher; window.Echo = new Echo({ broadcaster: 'pusher', key: import.meta.env.VITE_ABLY_PUBLIC_KEY, wsHost: 'realtime-pusher.ably.io', wsPort: 443, disableStats: true, encrypted: true, }); ``` ```javascript import { configureEcho } from "@laravel/echo-react"; configureEcho({ broadcaster: "ably", // key: import.meta.env.VITE_ABLY_PUBLIC_KEY, // wsHost: "realtime-pusher.ably.io", // wsPort: 443, // disableStats: true, // encrypted: true, }); ``` ```javascript import { configureEcho } from "@laravel/echo-vue"; configureEcho({ broadcaster: "ably", // key: import.meta.env.VITE_ABLY_PUBLIC_KEY, // wsHost: "realtime-pusher.ably.io", // wsPort: 443, // disableStats: true, // encrypted: true, }); ``` ```javascript import { configureEcho } from "@laravel/echo-svelte"; configureEcho({ broadcaster: "ably", // key: import.meta.env.VITE_ABLY_PUBLIC_KEY, // wsHost: "realtime-pusher.ably.io", // wsPort: 443, // disableStats: true, // encrypted: true, }); ``` -------------------------------- ### Park a directory Source: https://laravel.com/framework/docs/valet Registers a directory so all subdirectories are accessible as .test domains. ```bash cd ~/Sites valet park ```