TIP 07 / 73

Blade Directive to Show Data in Specific Environment.

Did you know Laravel has a 'production' blade directive that you can use to show data only when you are in a production environment?

There is also another 'env' directive that you can use to show data in the environment you specify.

blade
@production
     // This value is available only in production.
@endproduction

@env('staging')
     // This value is available only in staging.
@endenv

@env(['staging', 'production'])
     // This value is available in staging and production.
@endenv