From e2dfbdc5cf719f3f0de3c4b575d61ea252edfbdc Mon Sep 17 00:00:00 2001 From: "Negar Tarh Giti (Privet Joint Stock Company)" <2020amiramir@gmail.com> Date: Sat, 7 Sep 2024 08:40:23 +0330 Subject: [PATCH] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index c81017a..2ecb5dc 100644 --- a/README.md +++ b/README.md @@ -419,6 +419,10 @@ return [ 'fields' => [ ... 'version' => fn(mixed $content, int $status, string $message) => env('API_VERSION', 'x.x.x'), + or + 'version' => 'Namespace\Of\Custom\Class::static_method', //recommended + or + 'version' => 'any_callable_function', ``` You can get more information on this by studying the configuration file. @@ -463,7 +467,12 @@ return [ ... 'custom_keys'=>[ 'app'=> 'My Wonderful APP', + ... 'time'=> fn(mixed $content, int $status, string $message) => \Illuminate\Support\Carbon::now(), + or + 'time' => 'Namespace\Of\Custom\Class::static_method', //recommended + or + 'time' => 'any_callable_function', ``` and the result: ```json