Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
negartarh committed Sep 7, 2024
1 parent c3f10de commit e2dfbdc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2dfbdc

Please sign in to comment.