You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This trait supports nested data as well. You can either reference the keys by a nested array, or with a [dotted notation](https://laravel.com/docs/master/helpers#method-array-dot):
328
+
329
+
```php
330
+
class ImageRequest extends FormRequest
331
+
{
332
+
use ConvertsBase64ToFiles;
333
+
334
+
protected function base64FileKeys(): array
335
+
{
336
+
return [
337
+
'company.logo' => 'Logo.jpg',
338
+
'user' => [
339
+
'avatar' => 'Avatar.jpg',
340
+
],
341
+
];
342
+
}
343
+
}
344
+
```
345
+
327
346
Want to know more about this trait? Check out the [blog post](https://protone.media/blog/convert-and-store-base64-encoded-files-in-laravel-use-validation-rules-and-access-the-decoded-files-from-the-request-instance).
0 commit comments