PHP code example of audentio / laravel-uploader

1. Go to this page and download the library: Download audentio/laravel-uploader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

audentio / laravel-uploader example snippets


protected function _getUploaderConfig(): array
{
    return [
        'thumbnail' => [
            'variants' => [
                'thumb' => [
                    'width' => 528,
                    'height' => 280,
                ],
            ],
        ],
    ];
}

$uploads = Model::setupUploadArgs($args['model']);

if (!$model->validateUploads($uploads, $errors)) {
    $this->validationError($info, $errors, 'model');
}

$model->attachUploads($uploads);