REBELinBLUE\Deployer\Heartbeat::boot PHP Method

boot() public static method

Override the boot method to bind model event listeners.
public static boot ( )
    public static function boot()
    {
        parent::boot();
        // When first creating the model generate a webhook hash
        static::creating(function (Heartbeat $model) {
            if (!array_key_exists('hash', $model->attributes)) {
                $model->generateHash();
            }
        });
    }