PHP code example of tomshaw / mediable

1. Go to this page and download the library: Download tomshaw/mediable 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/ */

    

tomshaw / mediable example snippets


$this->dispatch('mediable.open');

$this->dispatch('mediable.open', id: 'description');

on(['mediable.on' => function ($files) {
  // Handle selected files...
}]);

'validation' => [
    'files.*' => '

'mimes:jpeg,png,jpg,gif,mp3,mp4,m4a,ogg,wav,webm,avi,mov,wmv,txt,pdf,doc,docx,xls,xlsx,ppt,pptx,zip,rar,svg'

'max:51200'

'disk' => env('MEDIABLE_DISK_DRIVER', 'public'),

'disk' => 's3',

'folder' => env('MEDIABLE_DISK_FOLDER', 'uploads'),
bash
php artisan mediable:install
bash
php artisan mediable:update
bash
php artisan migrate
bash
php artisan storage:link