public static function getReplacements($system_message = '', $payload = [], $help_link = '', $hateoas = [], $replacements = [])
    {
        if ($system_message) {
            $replacements[':system_message'] = $system_message;
        }
        if (!empty($payload)) {
            $replacements[':payload'] = $payload;
        }
        if ($help_link) {
            $replacements[':help'] = $help_link;
        }
        if (!empty($hateoas)) {
            $replacements[':links'] = $hateoas;
        }

        return $replacements;
    }
public static function getReplacements($system_message = '', $payload = [], $help_link = '', $hateoas = [], $replacements = [])
    {
        if ($system_message) {
            $replacements[':system_message'] = $system_message;
        }
        if (!empty($payload)) {
            $replacements[':payload'] = $payload;
        }
        if ($help_link) {
            $replacements[':help'] = $help_link;
        }
        if (!empty($hateoas)) {
            $replacements[':links'] = $hateoas;
        }

        return $replacements;
    }
public static function getReplacements ( $ system_message = '' , $ payload = [ ] , $ help_link = '' , $ hateoas = [ ] , $ replacements = [ ] ) { if ( $ system_message ) { $ replacements [ ':system_message' ] = $ system_message ; } if ( ! empty ( $ payload ) ) { $ replacements [ ':payload' ] = $ payload ; } if ( $ help_link ) { $ replacements [ ':help' ] = $ help_link ; } if ( ! empty ( $ hateoas ) ) { $ replacements [ ':links' ] = $ hateoas ; } return $ replacements ; }
Get array of replacements for mixing to Exception.

<code>
<?php
app('api.exception')->setReplacements(Errors::getReplacements('Not found', ['id' => 1111], 'help/article_not_found'));
throw new HttpException(404, 'Sorry, article is not found');
?>
</code>

@param $system_message
@param $payload
@param $help_link
@param array $hateoas      Send here static::getHATEOAS(['%id' => $id, '%placeholder' => 'value']) from generated controller
@param array $replacements

@return array
Get array of replacements for mixing to Exception .