/var/www/cobraambalaj/vendor/spatie/laravel-medialibrary/docs
NameSizeModeActions
advanced-usage/-0755rm
api/-0755rm
basic-usage/-0755rm
converting-images/-0755rm
converting-other-file-types/-0755rm
downloading-media/-0755rm
handling-uploads-with-media-library-pro/-0755rm
images/-0755rm
responsive-images/-0755rm
working-with-media-collections/-0755rm
about-us.md4620644editdlrm
changelog.md1800644editdlrm
installation-setup.md118080644editdlrm
introduction.md26870644editdlrm
questions-issues.md6050644editdlrm
requirements.md10880644editdlrm
support-us.md5530644editdlrm
troubleshooting.md9770644editdlrm
upgrading.md2240644editdlrm
_index.md1370644editdlrm
Edit: /var/www/cobraambalaj/vendor/spatie/laravel-medialibrary/docs/introduction.md (2687B)
--- title: Introduction weight: 1 --- This package can associate all sorts of files with Eloquent models. It provides a simple, fluent API to work with. The [Pro version of the package](https://medialibrary.pro) offers Blade, Vue and React components to handle uploads to the media library and to adminster the content of a medialibrary collection. Here are some quick code examples: ```php $yourModel = YourModel::find(1); $yourModel->addMedia($pathToFile)->toMediaCollection('images'); ``` It can also directly handle your uploads: ```php $yourModel->addMediaFromRequest('image')->toMediaCollection('images'); ``` Want to store some large files on another filesystem? No problem: ```php $yourModel->addMedia($smallFile)->toMediaCollection('downloads', 'local'); $yourModel->addMedia($bigFile)->toMediaCollection('downloads', 's3'); ``` The storage of the files is handled by [Laravel's Filesystem](http://laravel.com/docs/5.6/filesystem), so you can plug in any compatible filesystem. The package can also generate derived images such as thumbnails for images, video's and pdf's. Once you've [set up your model](/laravel-medialibrary/v9/basic-usage/preparing-your-model), they're easily accessible: ```php $yourModel->getMedia('images')->first()->getUrl('thumb'); ``` ## Are you a visual learner? We've recorded [a video course](https://spatie.be/videos/discovering-laravel-media-library) on how to use this package. It's the best way to get started using media library [![video course](/docs/laravel-medialibrary/v9/images/video-course.jpg)](https://spatie.be/videos/discovering-laravel-media-library/introducing-laravel-media-library) ## We have badges!
Latest Version Software License Build Status Quality Score Total Downloads