@@ 78-82 (lines=5) @@ | ||
75 | { |
|
76 | $register_request_macros = config('lodash.register_request_macros'); |
|
77 | ||
78 | if ($register_request_macros['getInt'] ?? false) { |
|
79 | Request::macro('getInt', function (string $name, int $default = 0): int { |
|
80 | return (int) $this->get($name, $default); |
|
81 | }); |
|
82 | } |
|
83 | ||
84 | if ($register_request_macros['getBool'] ?? false) { |
|
85 | Request::macro('getBool', function (string $name, bool $default = false): bool { |
|
@@ 84-88 (lines=5) @@ | ||
81 | }); |
|
82 | } |
|
83 | ||
84 | if ($register_request_macros['getBool'] ?? false) { |
|
85 | Request::macro('getBool', function (string $name, bool $default = false): bool { |
|
86 | return (bool) $this->get($name, $default); |
|
87 | }); |
|
88 | } |
|
89 | ||
90 | if ($register_request_macros['getFloat'] ?? false) { |
|
91 | Request::macro('getFloat', function (string $name, float $default = 0): float { |
|
@@ 90-94 (lines=5) @@ | ||
87 | }); |
|
88 | } |
|
89 | ||
90 | if ($register_request_macros['getFloat'] ?? false) { |
|
91 | Request::macro('getFloat', function (string $name, float $default = 0): float { |
|
92 | return (float) $this->get($name, $default); |
|
93 | }); |
|
94 | } |
|
95 | ||
96 | if ($register_request_macros['getString'] ?? false) { |
|
97 | Request::macro('getString', function (string $name, string $default = ''): string { |
|
@@ 96-100 (lines=5) @@ | ||
93 | }); |
|
94 | } |
|
95 | ||
96 | if ($register_request_macros['getString'] ?? false) { |
|
97 | Request::macro('getString', function (string $name, string $default = ''): string { |
|
98 | return (string) $this->get($name, $default); |
|
99 | }); |
|
100 | } |
|
101 | } |
|
102 | ||
103 | protected function loadTranslations(): void |