### Install and Initialize Stripe Projects Plugin Source: https://laravel.com/cloud/docs/api/stripe-projects Install the necessary Stripe CLI plugin and initialize the projects environment. ```bash stripe plugin install projects stripe projects init ``` -------------------------------- ### Configure Skill Installation Scope Source: https://laravel.com/cloud/docs/api/cli Forces installation to either the global directory or the current project directory. ```bash # Install globally (e.g. ~/.claude/skills) cloud skills:install --global # Install to the current project (e.g. .claude/skills) cloud skills:install --project ``` -------------------------------- ### Install Laravel PDF package Source: https://laravel.com/cloud/docs/knowledge-base/generating-pdfs Install the Spatie Laravel PDF package via Composer. ```bash composer require spatie/laravel-pdf ``` -------------------------------- ### Install Agent Skills Source: https://laravel.com/cloud/docs/api/cli Installs AI agent skills from the laravel/agent-skills repository. ```bash cloud skills:install ``` -------------------------------- ### Initialize and deploy an application Source: https://laravel.com/cloud/docs/api/cli Use the ship command to guide the creation and deployment process for a new application. ```bash cloud ship ``` -------------------------------- ### Configure Private Composer Packages for Laravel Source: https://laravel.com/cloud/docs/environments Authentication setup for private Composer packages before running the installation command. ```shell composer config http-basic.composer.fluxui.dev your-username your-license-key composer install --no-dev ``` -------------------------------- ### Configure Private Composer Packages for Symfony Source: https://laravel.com/cloud/docs/environments Authentication setup for private Composer packages before running the installation command. ```shell composer config http-basic.example.com your-username your-license-key composer install --no-dev ``` -------------------------------- ### Install Laravel Cloud CLI Source: https://laravel.com/cloud/docs/api/cli Install the CLI globally using Composer. Ensure the global vendor binaries directory is included in your system PATH. ```bash composer global require laravel/cloud-cli ``` -------------------------------- ### Install Skills for Specific Agents Source: https://laravel.com/cloud/docs/api/cli Installs skills for selected agents without interactive prompts. ```bash cloud skills:install --agent=claude --agent=cursor ``` -------------------------------- ### GET /instances/{instance}/background-processes Source: https://laravel.com/cloud/docs/api/background-processes/list-background-processes Retrieves a list of all background processes for the specified instance. ```APIDOC ## GET /instances/{instance}/background-processes ### Description Get a list of all background processes for the given instance. ### Method GET ### Endpoint /instances/{instance}/background-processes ### Parameters #### Path Parameters - **instance** (string) - Required - The instance identifier #### Query Parameters - **include** (array) - Optional - List of related resources to include (e.g., 'instance') ### Response #### Success Response (200) - **data** (array) - Paginated set of BackgroundProcessResource - **links** (object) - Pagination links - **meta** (object) - Pagination metadata - **included** (array) - Included InstanceResource objects ``` -------------------------------- ### Install AWS SDK for PHP Source: https://laravel.com/cloud/docs/private-cloud/iam-roles Run this command if your environment uses managed queues and the deployment fails due to a missing AWS SDK package. ```bash composer require aws/aws-sdk-php ``` -------------------------------- ### Install Symfony Cloud package Source: https://laravel.com/cloud/docs/queues Install the required package for Symfony Messenger integration via Composer. ```sh composer require laravel/symfony-on-cloud ``` -------------------------------- ### Configure Build and Deploy Commands Source: https://laravel.com/cloud/docs/quickstart Commands used to install dependencies, compile assets, and run database migrations during the deployment process. ```sh composer install --no-dev && npm run build ``` ```sh php artisan migrate --force ``` -------------------------------- ### Define Next.js and Nuxt Build Commands Source: https://laravel.com/cloud/docs/environments Standard build commands for installing Node dependencies and compiling frontend applications. ```shell npm ci && npm run build ``` -------------------------------- ### GET /applications Source: https://laravel.com/cloud/docs/api/introduction Retrieves a list of applications associated with the authenticated organization. ```APIDOC ## GET /applications ### Description Returns a JSON:API list of your applications. ### Method GET ### Endpoint https://cloud.laravel.com/api/applications ### Request Example curl https://cloud.laravel.com/api/applications \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json" ``` -------------------------------- ### Set the build command for Nuxt Source: https://laravel.com/cloud/docs/quickstart Use these commands to install dependencies and compile a Nuxt application, with an option for static site generation. ```sh npm ci --audit false npm run build # alternatively for static site generation # npx nuxt generate ``` -------------------------------- ### GET /buckets/{filesystem}/keys Source: https://laravel.com/cloud/docs/api/bucket-keys/list-object-storage-keys Retrieves a list of all keys for a specific object storage bucket. ```APIDOC ## GET /buckets/{filesystem}/keys ### Description Get a list of all keys for a specific object storage bucket. ### Method GET ### Endpoint /buckets/{filesystem}/keys ### Parameters #### Path Parameters - **filesystem** (string) - Required - The filesystem identifier #### Query Parameters - **include** (array) - Optional - List of related resources to include (e.g., filesystem) ### Response #### Success Response (200) - **data** (array) - Paginated set of FilesystemKeyResource - **links** (object) - Pagination links - **meta** (object) - Pagination metadata ``` -------------------------------- ### Set the build command for Next.js Source: https://laravel.com/cloud/docs/quickstart Use these commands to install dependencies and compile a Next.js application during the build process. ```sh npm ci --audit false npm run build ``` -------------------------------- ### GET /background-processes/{backgroundProcess} Source: https://laravel.com/cloud/docs/api/background-processes/get-background-process Retrieves the details of a specific background process. ```APIDOC ## GET /background-processes/{backgroundProcess} ### Description Get the details of a specific background process. ### Method GET ### Endpoint /background-processes/{backgroundProcess} ### Parameters #### Path Parameters - **backgroundProcess** (string) - Required - The background process identifier #### Query Parameters - **include** (array) - Optional - Related resources to include (e.g., instance) ### Response #### Success Response (200) - **data** (BackgroundProcessResource) - The background process resource object - **included** (array) - Optional list of related InstanceResource objects ``` -------------------------------- ### GET /bucket-keys/{filesystemKey} Source: https://laravel.com/cloud/docs/api/bucket-keys/get-object-storage-key Retrieves the details of a specific object storage key. ```APIDOC ## GET /bucket-keys/{filesystemKey} ### Description Get a specific object storage key. ### Method GET ### Endpoint /bucket-keys/{filesystemKey} ### Parameters #### Path Parameters - **filesystemKey** (string) - Required - The filesystem key identifier #### Query Parameters - **include** (array) - Optional - Include related resources (e.g., filesystem) ### Response #### Success Response (200) - **data** (FilesystemKeyResource) - The requested object storage key resource. - **included** (array) - Related filesystem resources if requested. ``` -------------------------------- ### OpenAPI Specification for Get Background Process Source: https://laravel.com/cloud/docs/api/background-processes/get-background-process Defines the GET endpoint for retrieving a specific background process by its identifier, including optional inclusion of instance data. ```yaml openapi: 3.1.0 info: title: Laravel Cloud version: 0.0.1 servers: - url: https://cloud.laravel.com/api security: - http: [] tags: - name: Applications - name: Environments - name: Domains - name: Commands - name: Deployments - name: Instances - name: Background Processes - name: Database Clusters - name: Databases - name: Database Snapshots - name: Database Restores - name: Object Storage Buckets - name: Bucket Keys - name: Caches - name: WebSocket Clusters - name: WebSocket Applications - name: Dedicated Clusters - name: Usage - name: Meta - name: Databases (Legacy) paths: /background-processes/{backgroundProcess}: get: tags: - Background Processes summary: Get background process description: Get the details of a specific background process. operationId: public.background-processes.show parameters: - name: backgroundProcess in: path required: true description: The background process identifier schema: type: - string - 'null' - name: include in: query schema: type: array items: type: string enum: - instance explode: false responses: '200': description: '`BackgroundProcessResource`' content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/BackgroundProcessResource' included: type: array items: $ref: '#/components/schemas/InstanceResource' required: - data '403': $ref: '#/components/responses/AuthorizationException' '404': $ref: '#/components/responses/ModelNotFoundException' components: schemas: BackgroundProcessResource: type: object properties: id: type: string type: type: string enum: - background_processes attributes: type: object properties: type: $ref: '#/components/schemas/DaemonType' processes: type: integer command: type: string config: type: array items: {} strategy_type: $ref: '#/components/schemas/DaemonStrategyType' strategy_threshold: type: - integer - 'null' created_at: type: - string - 'null' format: date-time required: - type - processes - command - config - strategy_type - strategy_threshold - created_at relationships: type: object properties: instance: type: object properties: data: anyOf: - $ref: '#/components/schemas/InstanceResourceIdentifier' - type: 'null' required: - data required: - id - type title: BackgroundProcessResource InstanceResource: type: object properties: id: type: string type: type: string enum: - instances attributes: type: object properties: name: type: string type: $ref: '#/components/schemas/InstanceType' size: $ref: '#/components/schemas/InstanceSize' scaling_type: $ref: '#/components/schemas/InstanceScalingType' min_replicas: type: integer max_replicas: type: integer queue_status: anyOf: - $ref: '#/components/schemas/SqsQueueStatus' description: >- Current lifecycle status of the managed queue. Null for non-queue instances. - type: 'null' paused: type: - boolean - 'null' description: >- Whether the managed queue is currently paused. Null for non-queue instances. ``` -------------------------------- ### GET /applications/{application} Source: https://laravel.com/cloud/docs/api/applications/get-application Retrieves the details of a specific application. You can optionally include related resources such as the organization, environments, or the default environment. ```APIDOC ## GET /applications/{application} ### Description Get a specific application by its identifier. ### Method GET ### Endpoint /applications/{application} ### Parameters #### Path Parameters - **application** (string) - Required - The application identifier #### Query Parameters - **include** (array) - Optional - Related resources to include (organization, environments, defaultEnvironment) ### Response #### Success Response (200) - **data** (object) - The ApplicationResource object ``` -------------------------------- ### Install Flysystem AWS S3 dependency Source: https://laravel.com/cloud/docs/resources/object-storage Required package for enabling S3-compatible file storage in Laravel applications. ```shell composer require league/flysystem-aws-s3-v3 "^3.0" --with-all-dependencies ``` -------------------------------- ### Install Laravel Nightwatch package Source: https://laravel.com/cloud/docs/knowledge-base/nightwatch-on-cloud Use Composer to add the Laravel Nightwatch package to your local application. ```bash composer require laravel/nightwatch ``` -------------------------------- ### Install WebSocket Dependencies Source: https://laravel.com/cloud/docs/resources/websockets Required packages for Laravel and Symfony applications to communicate with WebSocket clusters. ```sh composer require laravel/reverb npm install --save-dev laravel-echo pusher-js ``` ```sh composer require pusher/pusher-php-server npm install pusher-js ``` -------------------------------- ### Define Laravel Build Commands Source: https://laravel.com/cloud/docs/environments Standard build command for installing dependencies and compiling assets in a Laravel application. ```shell composer install --no-dev && npm run build ``` -------------------------------- ### Overwrite Existing Skills Source: https://laravel.com/cloud/docs/api/cli Uses the force flag to overwrite previously installed skills. ```bash cloud skills:install --force ``` -------------------------------- ### Run Nightwatch agent command Source: https://laravel.com/cloud/docs/knowledge-base/nightwatch-on-cloud Execute this command as a background process in your Cloud environment to start the agent. ```bash php artisan nightwatch:agent ``` -------------------------------- ### Define Symfony Build Commands Source: https://laravel.com/cloud/docs/environments Standard build command for installing dependencies and compiling assets in a Symfony application. ```shell composer install --no-dev && php bin/console asset-map:compile ``` -------------------------------- ### OpenAPI specification for listing applications Source: https://laravel.com/cloud/docs/api/applications/list-applications Defines the GET /applications endpoint, including query parameters for filtering and inclusion of related resources. ```yaml openapi: 3.1.0 info: title: Laravel Cloud version: 0.0.1 servers: - url: https://cloud.laravel.com/api security: - http: [] tags: - name: Applications - name: Environments - name: Domains - name: Commands - name: Deployments - name: Instances - name: Background Processes - name: Database Clusters - name: Databases - name: Database Snapshots - name: Database Restores - name: Object Storage Buckets - name: Bucket Keys - name: Caches - name: WebSocket Clusters - name: WebSocket Applications - name: Dedicated Clusters - name: Usage - name: Meta - name: Databases (Legacy) paths: /applications: get: tags: - Applications summary: List applications description: Get a list of all applications for the authenticated organization. operationId: public.applications.index parameters: - name: filter[name] in: query schema: type: string - name: filter[region] in: query schema: type: string - name: filter[slug] in: query schema: type: string - name: include in: query schema: type: array items: type: string enum: - organization - environments - defaultEnvironment explode: false responses: '200': description: Paginated set of `ApplicationResource` content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ApplicationResource' links: type: object properties: first: type: string last: type: string prev: type: string next: type: string meta: type: object properties: current_page: type: integer minimum: 1 from: type: - integer - 'null' minimum: 1 last_page: type: integer minimum: 1 links: type: array description: Generated paginator links. items: type: object properties: url: type: - string - 'null' label: type: string active: type: boolean required: - url - label - active path: type: - string - 'null' description: Base path for paginator generated URLs. per_page: type: integer description: Number of items shown per page. minimum: 0 to: type: - integer - 'null' description: Number of the last item in the slice. minimum: 1 total: type: integer description: Total number of items being paginated. minimum: 0 required: - current_page - from - last_page - links - path - per_page - to - total included: type: array items: anyOf: - $ref: '#/components/schemas/RepositoryResource' ``` -------------------------------- ### OpenAPI specification for Get application Source: https://laravel.com/cloud/docs/api/applications/get-application Defines the endpoint for retrieving a specific application, including path parameters and response schemas. ```yaml openapi: 3.1.0 info: title: Laravel Cloud version: 0.0.1 servers: - url: https://cloud.laravel.com/api security: - http: [] tags: - name: Applications - name: Environments - name: Domains - name: Commands - name: Deployments - name: Instances - name: Background Processes - name: Database Clusters - name: Databases - name: Database Snapshots - name: Database Restores - name: Object Storage Buckets - name: Bucket Keys - name: Caches - name: WebSocket Clusters - name: WebSocket Applications - name: Dedicated Clusters - name: Usage - name: Meta - name: Databases (Legacy) paths: /applications/{application}: get: tags: - Applications summary: Get application description: Get a specific application. operationId: public.applications.show parameters: - name: application in: path required: true description: The application identifier schema: type: string - name: include in: query schema: type: array items: type: string enum: - organization - environments - defaultEnvironment explode: false responses: '200': description: '`ApplicationResource`' content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/ApplicationResource' included: type: array items: anyOf: - $ref: '#/components/schemas/RepositoryResource' - $ref: '#/components/schemas/OrganizationResource' - $ref: '#/components/schemas/EnvironmentResource' - $ref: '#/components/schemas/DeploymentResource' required: - data '403': $ref: '#/components/responses/AuthorizationException' '404': $ref: '#/components/responses/ModelNotFoundException' components: schemas: ApplicationResource: type: object properties: id: type: string type: type: string enum: - applications attributes: type: object properties: name: type: string slug: type: string region: $ref: '#/components/schemas/CloudRegion' root_directory: type: - string - 'null' slack_channel: type: - string - 'null' avatar_url: type: string created_at: type: - string - 'null' format: date-time repository: type: - object - 'null' properties: full_name: type: string default_branch: type: string required: - full_name - default_branch required: - name - slug - region - root_directory - slack_channel - avatar_url - created_at - repository relationships: type: object properties: repository: type: object properties: data: anyOf: - $ref: '#/components/schemas/RepositoryResourceIdentifier' - type: 'null' required: - data organization: type: object properties: data: anyOf: - $ref: '#/components/schemas/OrganizationResourceIdentifier' - type: 'null' required: - data environments: type: object properties: data: type: array items: $ref: '#/components/schemas/EnvironmentResourceIdentifier' required: - data deployments: type: object properties: data: type: array items: ``` -------------------------------- ### Access Forbidden Log Examples Source: https://laravel.com/cloud/docs/knowledge-base/logs These logs indicate blocked requests from bots scanning for vulnerabilities and can be safely ignored. ```shell Example logs: 2025-03-26 17:26:05 UTC 2025/03/26 17:26:05 [error] 148#148: *35409 access forbidden by rule, client: 2600:1f16:e0:8506:ea9f::8, server: _, request: "GET /config/php.ini HTTP/1.1", host: "yourWebsite.com" 2025-03-26 17:26:18 UTC 2025/03/26 17:26:18 [error] 150#150: *35439 access forbidden by rule, client: 2600:1f16:e0:8506:b40f::6, server: _, request: "GET /.aws/credentials HTTP/1.1", host: "yourWebsite.com" 2025-03-26 17:26:24 UTC 2025/03/26 17:26:24 [error] 150#150: *35455 access forbidden by rule, client: 2600:1f16:e0:8506:ea9f::8, server: _, request: "GET /config.ini HTTP/1.1", host: "yourWebsite.com" ``` -------------------------------- ### Configure Symfony build and deploy commands Source: https://laravel.com/cloud/docs/quickstart Set these commands in the Laravel Cloud dashboard to handle dependency installation, asset compilation, and database migrations. ```sh composer install --no-dev && php bin/console asset-map:compile ``` ```sh php bin/console doctrine:migrations:migrate --no-interaction ``` -------------------------------- ### Define secret keys and values Source: https://laravel.com/cloud/docs/secrets Example format for defining secret keys and values within the Laravel Cloud dashboard. ```dotenv GITHUB_TOKEN=ghp_example CLOUDFLARE_API_TOKEN=example-token AWS_ACCESS_KEY_ID=example-key ``` -------------------------------- ### List object storage keys OpenAPI definition Source: https://laravel.com/cloud/docs/api/bucket-keys/list-object-storage-keys Defines the GET endpoint for retrieving keys from a specific filesystem bucket. ```yaml openapi: 3.1.0 info: title: Laravel Cloud version: 0.0.1 servers: - url: https://cloud.laravel.com/api security: - http: [] tags: - name: Applications - name: Environments - name: Domains - name: Commands - name: Deployments - name: Instances - name: Background Processes - name: Database Clusters - name: Databases - name: Database Snapshots - name: Database Restores - name: Object Storage Buckets - name: Bucket Keys - name: Caches - name: WebSocket Clusters - name: WebSocket Applications - name: Dedicated Clusters - name: Usage - name: Meta - name: Databases (Legacy) paths: /buckets/{filesystem}/keys: get: tags: - Bucket Keys summary: List object storage keys description: Get a list of all keys for a specific object storage bucket. operationId: public.buckets.keys.index parameters: - name: filesystem in: path required: true description: The filesystem identifier schema: type: string - name: include in: query schema: type: array items: type: string enum: - filesystem explode: false responses: '200': description: Paginated set of `FilesystemKeyResource` content: application/vnd.api+json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FilesystemKeyResource' links: type: object properties: first: type: string last: type: string prev: type: string next: type: string meta: type: object properties: current_page: type: integer minimum: 1 from: type: - integer - 'null' minimum: 1 last_page: type: integer minimum: 1 links: type: array description: Generated paginator links. items: type: object properties: url: type: - string - 'null' label: type: string active: type: boolean required: - url - label - active path: type: - string - 'null' description: Base path for paginator generated URLs. per_page: type: integer description: Number of items shown per page. minimum: 0 to: type: - integer - 'null' description: Number of the last item in the slice. minimum: 1 total: type: integer description: Total number of items being paginated. minimum: 0 required: - current_page - from - last_page - links - path - per_page - to - total included: type: array items: $ref: '#/components/schemas/FilesystemResource' required: - data - links - meta '403': $ref: '#/components/responses/AuthorizationException' '404': ``` -------------------------------- ### Deploy an application Source: https://laravel.com/cloud/docs/api/cli Execute a deployment for the current project directory using the deploy command. ```bash cloud deploy ``` ```bash cloud deploy --open ``` ```bash cloud deploy:monitor ``` -------------------------------- ### Provision Multiple Resources Source: https://laravel.com/cloud/docs/api/stripe-projects Provision a plan, an application, and a database resource sequentially. ```bash stripe projects add laravel_cloud/starter --name my-plan stripe projects add laravel_cloud/application --config '{"name":"My App","repository":"laravel/laravel","region":"us-east-1"}' stripe projects add laravel_cloud/mysql --name my-database ``` -------------------------------- ### Open Application Source: https://laravel.com/cloud/docs/api/cli Opens the current application in the browser. ```bash cloud browser ``` -------------------------------- ### Create a Laravel Application Source: https://laravel.com/cloud/docs/api/stripe-projects Provision a new application by specifying the repository and region in the configuration JSON. ```bash stripe projects add laravel_cloud/application --config '{"name":"My App","repository":"owner/repo","region":"us-east-1"}' ``` -------------------------------- ### Verify DNS records via terminal Source: https://laravel.com/cloud/docs/domains Use these commands to check DNS propagation and record visibility for your domain. Replace example.com with your specific domain. ```bash # Which DNS provider is responsible for your domain? dig NS example.com +short nslookup -type=NS example.com # Are your origin records resolving? (use the record type you configured — A or CNAME) dig A example.com +short dig CNAME example.com +short nslookup -type=A example.com nslookup -type=CNAME example.com # Is the ownership verification record visible? dig TXT _cf-custom-hostname.example.com +short nslookup -type=TXT _cf-custom-hostname.example.com # Are the SSL validation records visible? (may be TXT or CNAME depending on your setup) dig TXT _acme-challenge.example.com +short dig CNAME _acme-challenge.example.com +short nslookup -type=TXT _acme-challenge.example.com nslookup -type=CNAME _acme-challenge.example.com ``` -------------------------------- ### POST /applications Source: https://laravel.com/cloud/docs/api/applications/create-application Creates a new application by providing the repository, name, and region. Optional parameters include source control provider, root directory, and cluster ID. ```APIDOC ## POST /applications ### Description Create a new application. ### Method POST ### Endpoint /applications ### Parameters #### Request Body - **repository** (string) - Required - The repository name. - **name** (string) - Required - The application name (3-40 characters). - **region** (string) - Required - The cloud region. - **source_control_provider_type** (string) - Optional - The source control provider. - **root_directory** (string) - Optional - The root directory path. - **cluster_id** (string) - Optional - The identifier of a dedicated cluster. ### Response #### Success Response (201) - **data** (object) - The created ApplicationResource. ``` -------------------------------- ### Configure PHP for local Datadog agent Source: https://laravel.com/cloud/docs/private-cloud/build-configuration Use this command to create a PHP configuration file that points to a local Datadog trace agent running on localhost. ```bash cat > /usr/local/etc/php/conf.d/99-datadog.ini <<'EOF' datadog.trace.agent_url = http://localhost:8126 datadog.trace.agent_connect_timeout = 2000 datadog.trace.agent_timeout = 5000 datadog.service = foo-bar-api datadog.env = staging datadog.trace.sample_rate = 1.0 datadog.trace.enabled = On EOF ``` -------------------------------- ### POST /instances/{instance}/background-processes Source: https://laravel.com/cloud/docs/api/background-processes/create-background-process Creates a new background process for the specified instance. Supports configuring worker-specific settings or custom commands. ```APIDOC ## POST /instances/{instance}/background-processes ### Description Create a new background process for an instance. ### Method POST ### Endpoint /instances/{instance}/background-processes ### Parameters #### Path Parameters - **instance** (string) - Required - The instance identifier #### Request Body - **type** (DaemonType) - Required - The type of background process - **processes** (integer) - Required - Number of processes (1-10) - **command** (string) - Optional - Custom command to run (required when type is 'custom') - **config** (object) - Optional - Configuration object for 'worker' type processes: - **connection** (string) - Optional - The queue connection name - **queue** (string) - Optional - The queue name(s) - **tries** (integer) - Optional - Number of attempts - **backoff** (integer) - Optional - Seconds to wait before retrying - **sleep** (integer) - Optional - Seconds to sleep when no jobs available - **rest** (integer) - Optional - Seconds to rest between jobs - **timeout** (integer) - Optional - Seconds before job timeout - **force** (boolean) - Optional - Force worker in maintenance mode ### Response #### Success Response (201) - **data** (BackgroundProcessResource) - The created background process resource - **included** (array) - Included instance resources ``` -------------------------------- ### Manage Instances Source: https://laravel.com/cloud/docs/api/cli Perform CRUD operations and view available sizes for instances. ```bash cloud instance:list cloud instance:get cloud instance:create cloud instance:update cloud instance:delete cloud instance:sizes ``` -------------------------------- ### Configure PHP for remote Datadog agent Source: https://laravel.com/cloud/docs/private-cloud/build-configuration Use this command to create a PHP configuration file that points to a remote Datadog trace agent. ```bash cat > /usr/local/etc/php/conf.d/99-datadog.ini <<'EOF' datadog.trace.agent_url = https://your-hostname.tld:8126 datadog.trace.agent_connect_timeout = 2000 datadog.trace.agent_timeout = 5000 datadog.service = foo-bar-api datadog.env = staging datadog.trace.sample_rate = 1.0 datadog.trace.enabled = On EOF ``` -------------------------------- ### Configure repository defaults Source: https://laravel.com/cloud/docs/api/cli Save application and organization IDs to a local configuration file to avoid repeated manual input. ```bash cloud repo:config ``` -------------------------------- ### GET /api/ip Source: https://laravel.com/cloud/docs/network Retrieves a list of outbound IP addresses for Laravel Cloud applications, organized by region. ```APIDOC ## GET /api/ip ### Description Retrieves a JSON object containing the current outbound IPv4 and IPv6 addresses for Laravel Cloud, categorized by region. ### Method GET ### Endpoint https://cloud.laravel.com/api/ip ### Response #### Success Response (200) - **region** (object) - A map of region names to their respective IP address configurations. - **ipv4** (array) - List of IPv4 addresses for the region. - **ipv6** (array) - List of IPv6 address ranges for the region. #### Response Example { "us-east-2": { "ipv4": ["3.140.62.214", "3.139.253.68"], "ipv6": ["2600:1f16:e0:8500::/56"] }, "eu-west-2": { "ipv4": ["35.178.113.65"], "ipv6": ["2a05:d01c:243:e500::/56"] } } ``` -------------------------------- ### Open Laravel Cloud Dashboard Source: https://laravel.com/cloud/docs/api/stripe-projects Launch the Laravel Cloud dashboard for advanced resource management. ```bash stripe projects open laravel_cloud ``` -------------------------------- ### Configure alternative package managers Source: https://laravel.com/cloud/docs/knowledge-base/using-yarn-bun-pnpm Override default build commands to use Bun, Yarn, or PNPM instead of npm. Ensure default npm commands are removed or commented out before adding these. ```bash npm install -g bun bun install bun run build ``` ```bash npm install -g yarn yarn install yarn run build ``` ```bash npm install -g pnpm pnpm install pnpm run build ``` -------------------------------- ### Generate Application Key Source: https://laravel.com/cloud/docs/quickstart Command to generate an APP_KEY for environment configuration. ```sh php artisan key:generate --show ``` -------------------------------- ### Install Cron Expression Dependency Source: https://laravel.com/cloud/docs/scheduled-tasks Required when using RecurringMessage::cron(...) to ensure the dependency is available in production builds. ```sh composer require dragonmantank/cron-expression ``` -------------------------------- ### Browse Laravel Cloud Services Source: https://laravel.com/cloud/docs/api/stripe-projects List all available services provided by Laravel Cloud. ```bash stripe projects catalog laravel_cloud ``` -------------------------------- ### POST /buckets/{filesystem}/keys Source: https://laravel.com/cloud/docs/api/bucket-keys/create-object-storage-key Create a new key for an object storage bucket. ```APIDOC ## POST /buckets/{filesystem}/keys ### Description Create a new key for an object storage bucket. ### Method POST ### Endpoint /buckets/{filesystem}/keys ### Parameters #### Path Parameters - **filesystem** (string) - Required - The filesystem identifier #### Request Body - **name** (string) - Required - The name of the key (3-40 characters) - **permission** (FilesystemKeyPermission) - Required - The permission level for the key ### Response #### Success Response (201) - **data** (FilesystemKeyResource) - The created filesystem key resource - **included** (array) - Included filesystem resources ``` -------------------------------- ### Configure local Datadog trace agent Source: https://laravel.com/cloud/docs/private-cloud/build-configuration Use these commands to write the Datadog agent configuration file and append the API key from environment variables. ```bash cat > /opt/datadog-agent/etc/datadog.yaml <<'EOF' log_level: "warn" remote_configuration: enabled: false EOF echo "api_key: $DD_API_KEY" >> /opt/datadog-agent/etc/datadog.yaml ``` -------------------------------- ### Trigger a deployment via HTTP hook Source: https://laravel.com/cloud/docs/deployments Use a POST request to the provided deploy hook URL to initiate a deployment. Optionally specify a commit hash to deploy a particular version. ```shell curl -X POST "https://your-deploy-hook-url?commit_hash=abc123def456" ``` -------------------------------- ### Production Command Failure Output Source: https://laravel.com/cloud/docs/knowledge-base/command-failed-prod-app Example of the warning output displayed when a command is cancelled due to production environment restrictions. ```shell APPLICATION IN PRODUCTION. WARN Command cancelled. ``` -------------------------------- ### Manage Commands Source: https://laravel.com/cloud/docs/api/cli Run one-off commands and list execution history. ```bash cloud command:run ``` ```bash cloud command:list cloud command:get ``` -------------------------------- ### Generate PDF with Laravel PDF facade Source: https://laravel.com/cloud/docs/knowledge-base/generating-pdfs Render a view as a PDF and stream it as a download using the Pdf facade. ```php use Spatie\LaravelPdf\Facades\Pdf; public function download() { return Pdf::view('pdfs.invoice', ['invoice' => $invoice]) ->format('a4') ->download('invoice.pdf'); } ``` -------------------------------- ### Authenticate via Browser Source: https://laravel.com/cloud/docs/api/cli Initiate browser-based OAuth authentication to authorize the CLI and store an API token locally. ```bash cloud auth ``` -------------------------------- ### OpenAPI specification for Get object storage key Source: https://laravel.com/cloud/docs/api/bucket-keys/get-object-storage-key Defines the endpoint, parameters, and response schema for retrieving a specific object storage key. ```yaml openapi: 3.1.0 info: title: Laravel Cloud version: 0.0.1 servers: - url: https://cloud.laravel.com/api security: - http: [] tags: - name: Applications - name: Environments - name: Domains - name: Commands - name: Deployments - name: Instances - name: Background Processes - name: Database Clusters - name: Databases - name: Database Snapshots - name: Database Restores - name: Object Storage Buckets - name: Bucket Keys - name: Caches - name: WebSocket Clusters - name: WebSocket Applications - name: Dedicated Clusters - name: Usage - name: Meta - name: Databases (Legacy) paths: /bucket-keys/{filesystemKey}: get: tags: - Bucket Keys summary: Get object storage key description: Get a specific object storage key. operationId: public.bucket-keys.show parameters: - name: filesystemKey in: path required: true description: The filesystem key identifier schema: type: string - name: include in: query schema: type: array items: type: string enum: - filesystem explode: false responses: '200': description: '`FilesystemKeyResource`' content: application/vnd.api+json: schema: type: object properties: data: $ref: '#/components/schemas/FilesystemKeyResource' included: type: array items: $ref: '#/components/schemas/FilesystemResource' required: - data '403': $ref: '#/components/responses/AuthorizationException' '404': $ref: '#/components/responses/ModelNotFoundException' components: schemas: FilesystemKeyResource: type: object properties: id: type: string type: type: string enum: - filesystemKeys attributes: type: object properties: name: type: string permission: $ref: '#/components/schemas/FilesystemKeyPermission' access_key_id: type: - string - 'null' access_key_secret: type: - string - 'null' created_at: type: - string - 'null' format: date-time required: - name - permission - access_key_id - access_key_secret - created_at relationships: type: object properties: filesystem: type: object properties: data: anyOf: - $ref: '#/components/schemas/FilesystemResourceIdentifier' - type: 'null' required: - data required: - id - type title: FilesystemKeyResource FilesystemResource: type: object properties: id: type: string type: type: string enum: - filesystems attributes: type: object properties: name: type: string type: $ref: '#/components/schemas/FilesystemType' status: $ref: '#/components/schemas/FilesystemStatus' visibility: $ref: '#/components/schemas/FilesystemVisibility' jurisdiction: $ref: '#/components/schemas/FilesystemJurisdiction' endpoint: type: - string - 'null' url: type: - string - 'null' allowed_origins: type: 'null' cors_settings: type: 'null' created_at: type: - string - 'null' format: date-time required: - name - type - status - visibility - jurisdiction - endpoint - url - allowed_origins - cors_settings - created_at relationships: type: object properties: keys: type: object ``` -------------------------------- ### Configure PHP memory limit via build commands Source: https://laravel.com/cloud/docs/environments Use sed commands during the build process to inject memory limit settings into application files without manual code changes. ```bash # Add memory_limit to the top of the public/index.php file... sed -i 's/