PHP Developer Guide
Other documentationsDemoCommunityGitHub
  • Forest Admin
  • Getting started
    • How it works
    • Quick start
      • Symfony
      • Laravel
    • Create your agent
    • Troubleshooting
    • Migrating legacy agents
      • Pre-requisites
      • Recommendations
      • Migration steps
      • Code transformations
        • API Charts
        • Live Queries
        • Smart Charts
        • Route overrides
        • Smart Actions
        • Smart Fields
        • Smart Relationships
        • Smart Segments
  • Data Sources
    • Getting Started
      • Collection selection
      • Naming conflicts
      • Query interface and Native Queries
        • Fields and projections
        • Filters
        • Aggregations
    • Provided data sources
      • Doctrine
      • Eloquent
        • Polymorphic relationships
    • Write your own
      • Translation strategy
        • Structure declaration
        • Capabilities declaration
        • Read implementation
        • Write implementation
        • Intra-data source Relationships
      • Contribute
  • Agent customization
    • Getting Started
    • Actions
      • Scope and context
      • Result builder
      • Static Forms
      • Dynamic Forms
      • Related data invalidation
    • Charts
      • Value
      • Objective
      • Percentage
      • Distribution
      • Leaderboard
      • Time-based
    • Fields
      • Add fields
      • Move, rename and remove fields
      • Override binary field mode
      • Override writing behavior
      • Override filtering behavior
      • Override sorting behavior
      • Validation
    • Hooks
      • Collection hook
      • Collection override
    • Pagination
    • Plugins
      • Write your own
    • Relationships
      • To a single record
      • To multiple records
      • Computed foreign keys
      • Under the hood
    • Search
    • Segments
  • Frontend customization
    • Smart Charts
      • Create a table chart
      • Create a bar chart
      • Create a cohort chart
      • Create a density map
    • Smart Views
      • Create a Map view
      • Create a Calendar view
      • Create a Shipping view
      • Create a Gallery view
      • Create a custom tinder-like validation view
      • Create a custom moderation view
  • Deploying to production
    • Environments
      • Deploy on AWS
      • Deploy on Heroku
      • Deploy on GCP
      • Deploy on Ubuntu
    • Development workflow
    • Using branches
    • Deploying your changes
    • Forest Admin CLI commands
      • init
      • login
      • branch
      • switch
      • set-origin
      • push
      • environments:create
      • environments:reset
      • deploy
  • Upgrade
    • Laravel agent upgrade to v3
  • Under the hood
    • .forestadmin-schema.json
    • Data Model
      • Typing
      • Relationships
    • Security & Privacy
Powered by GitBook
On this page

Was this helpful?

  1. Deploying to production

Deploying your changes

PreviousUsing branchesNextForest Admin CLI commands

Last updated 1 year ago

Was this helpful?

This is the official documentation of the forestadmin/laravel-forestadmin v2+ and forestadmin/symfony-forestadmin PHP agents.

You're building a great feature that requires tweaking your layout (UI), you've used the Layout Editor and it looks just like you had imagined? Well now is the time to stage it to an upper Environment.

Imagine this is your current situation:

This would be the case if you chose "Staging" as the origin of your branch when you first created it. You have then made layout changes (Δ) over it.

Applying your changes to your Production Environment: deploy

forest deploy

The result is the following:

As all your environments' layouts depend on your reference environment, the deploy command will apply the layout changes to all your project environments. In the example above, your layout changes are also applied to the Remote Environment, as it is based on Production.

Deploy with care as such action cannot be reverted.

Testing your changes on a Remote Environment: push

Let’s say that before the deployment to Production, you want to test and validate your charges on a staging environment.

forest push

Pushing your changes from your local Branch will automatically delete it.

Deploying the layout of a Remote Environment

Once you have tested your new layout on "Remote 1", you can't deploy your Branch layout to "Production", as your Branch has been deleted by the action of pushing it to "Remote 1".

To deploy it from this Environment, simply click on "Deploy to production" in the top banner of your Environment layout.

Making changes directly from a Remote Environment

Imagine you have pushed a Branch layout changes onto a Remote Environment, but notice a slight change is still required in the layout. You can apply the final touches using the Layout Editor from the Remote Environment. It will be applied on top of your Branch layout changes; any changes you make on that Remote Environment will also be deployed when you decide to run forest deploy.

You can also create a new branch with your Remote Environment as the origin and do the process explained above.

deploy means applying your branch's changes to your reference environment definitively. To achieve this, you'll be using Forest Admin CLI's command:

Don't forget to deploy your backend changes (if any) before the deploy command, as showcased on .

push means moving your Branch's changes to a Remote Environment set as the origin of your Branch. To achieve this, you'll be using Forest Admin CLI's command:

Note that you'll be pushing your current Branch. To select another Branch, use . If the origin of your Branch is not the Remote you want (ie: staging) change it with

As your company grows, so does your development flow. You may need a more complex hierarchy between environments where you have more than one layer of test environments before production (test, staging, qa, preprod,...). This is possible using the Forest Admin CLI and the right Environment settings, see .

deploy
push
switch
set-origin
here
this flowchart