Handling media in a Laravel app
View Slide
Freek Van der HertenPartner & developer at SPATIE@freekmurzehttps://spatie.behttps://ohdearapp.comhttps://fullstackeurope.comhttps://murze.be
Open sourcesoftware
https://spatie.be/open-source
Some statistics± 200 public repositories on GitHubAugust 2016: ± 800 000 downloadsAugust 2017: ± 5 000 000 downloadsAugust 2018: ± 17 000 000 downloads± 1 250 000 downloads a monthhttps://murze.be/the-story-behind-our-open-source-efforts
Postcardware
Spatie Samberstraat 69D 2060 Antwerp Belgium
https://spatie.be/open-source/postcards
Let's talk about media
The problemUser uploaded contentWhere to store it all?How to retrieve it?How to optimize images?
The problemBoring code to writeNeed the same things in every projectWrite it slightly different in each project
Laravel Medialibrary
Laravel MedialibraryAssociate files with Eloquent modelsCan group media into collectionsImage conversionsUses multiple filesystems
Laravel MedialibraryOptimize converted imagesCustom image generatorsCustomize directory structureCustom attributes
https://docs.spatie.be/laravel-medialibrary
Demo
Wrapping up
Resourceshttps://github.com/spatie/medialibrary-demo-laracon https://docs.spatie.be/laravel-medialibrary/v7 https://www.youtube.com/watch?v=4lq_6JLR2H8 https://github.com/spatie/laravel-medialibrary
Future plansVue components Uploads Nova Tool Release Q4 2018 - Q1 2019
TeamworkSebastian De Deyne @sebdedeyne Willem Van Bockstal @willemvbockstal Alex Vanderbist @alexvanderbist Brent Roose @brendt_gd