@febalist/laravel-media

6.0.0 • Public • Published
composer require febalist/laravel-media
php artisan vendor:publish --provider 'Febalist\Laravel\Media\MediaServiceProvider'
php artisan migrate
MEDIA_DISK=cloud
MEDIA_PATH=media
MEDIA_QUEUE=media
    use HasMedia;

    public function mediaConvert(MediaConverter $converter)
    {
        $converter->optimize();
        $converter->conversion('thumb')->fit_crop(800, 450);
    }

Vue input

Vue.use(require('./../../vendor/febalist/laravel-media/src/index'));
{{ $model->mediaInput(['multiple' => true, 'mime' => 'image/*']) }}
$model->updateMediaFromInput();

JS helpers

const media = require('./../../vendor/febalist/laravel-media/src/media');
media.select_images().then(files => {
  media.upload(files, {
    model_type: 'App\\User',
    model_id: 1,
    onprogress: function(progress, uploaded, event) {
      console.log({progress, uploaded, event});
    },
    onuploaded: function(result, error, file) {
      console.log({result, error, file});
    },
  }).then(results => {
    console.log(results);
  });
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
6.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
6.0.00
5.6.00
1.2.10
1.2.00
1.1.00
1.0.00
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i @febalist/laravel-media

Weekly Downloads

0

Version

6.0.0

License

ISC

Unpacked Size

12.3 kB

Total Files

5

Last publish

Collaborators

  • febalist