<?php preg_replace_callback( string|array $pattern, callable $callback, string|array $subject, int $limit = -1, int &$count = null, int $flags = 0): string|array|null
<?php $content = preg_replace('/^(\s*)-\s*/m', '\1', $content); } $content = preg_replace_callback( '/^(\s+)(id|timestamps(Tz)?|softDeletes(Tz)?)$/mi', fn ($matches) => $matches[1] . strtolower($matches[2]) . ': ' . $matches[2], $content ); $content = preg_replace_callback( '/^(\s+)(id|timestamps(Tz)?|softDeletes(Tz)?): true$/mi',
<?php $content ); $content = preg_replace_callback( '/^(\s+)(id|timestamps(Tz)?|softDeletes(Tz)?): true$/mi', fn ($matches) => $matches[1] . strtolower($matches[2]) . ': ' . $matches[2], $content ); $content = preg_replace_callback( '/^(\s+)resource?$/mi',
<?php $content ); $content = preg_replace_callback( '/^(\s+)resource?$/mi', fn ($matches) => $matches[1] . 'resource: web', $content ); $content = preg_replace_callback( '/^(\s+)invokable?$/mi',
<?php $content ); $content = preg_replace_callback( '/^(\s+)invokable?$/mi', fn ($matches) => $matches[1] . 'invokable: true', $content ); $content = preg_replace_callback( '/^(\s+)uuid(: true)?$/mi',
<?php $content ); $content = preg_replace_callback( '/^(\s+)uuid(: true)?$/mi', fn ($matches) => $matches[1] . 'id: uuid primary', $content ); return Yaml::parse($content); }