Extending A Layout: Custom If Statements

Use Illuminate\Support\Facades\Blade;

/**
 * Perform post-registration booting of services.
 *
 * @return void
 */
public function boot()
{
    Blade::if('env', function ($environment) {
        return app()->environment($environment);
    });
}
@env('local')
    // The application is in the local environment...
@elseenv('testing')
    // The application is in the testing environment...
@else
    // The application is not in the local or testing environment...
@endenv

Extending A Layout: Custom If Statements — Structure map

Clickable & Draggable!

Extending A Layout: Custom If Statements — Related pages: