| 1 | <?php  | 
            ||
| 11 | trait LoadFileTrait  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * @var string[] that defines which attributes will be recibe files.  | 
            ||
| 15 | *  | 
            ||
| 16 | * Example  | 
            ||
| 17 | * ```php  | 
            ||
| 18 | * [  | 
            ||
| 19 | * // 'avatar' attribute load file uploaded as 'avatar'  | 
            ||
| 20 | * 'avatar',  | 
            ||
| 21 | * // 'background_fullsize' attribute load file uploaded as 'background'  | 
            ||
| 22 | * 'background_fullsize' => 'background',  | 
            ||
| 23 | * ]  | 
            ||
| 24 | * ```  | 
            ||
| 25 | */  | 
            ||
| 26 | public $fileAttributes = [];  | 
            ||
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * Parse the allowed uploaded files.  | 
            ||
| 30 | *  | 
            ||
| 31 | * @return UploadedFile[] files sent to the action.  | 
            ||
| 32 | */  | 
            ||
| 33 | protected function parseFileAttributes(): array  | 
            ||
| 49 | }  | 
            ||
| 50 |