$30 off During Our Annual Pro Sale. View Details »

Handling media in a Laravel app (Laracon eu)

Handling media in a Laravel app (Laracon eu)

Freek Van der Herten

August 30, 2018
Tweet

More Decks by Freek Van der Herten

Other Decks in Programming

Transcript

  1. Handling media

    in a Laravel app

    View Slide

  2. Freek Van der Herten
    Partner & developer at SPATIE
    @freekmurze
    https://spatie.be
    https://ohdearapp.com
    https://fullstackeurope.com
    https://murze.be

    View Slide

  3. Open source
    software

    View Slide

  4. https://spatie.be/open-source

    View Slide

  5. Some statistics
    ± 200 public repositories on GitHub
    August 2016: ± 800 000 downloads
    August 2017: ± 5 000 000 downloads
    August 2018: ± 17 000 000 downloads
    ± 1 250 000 downloads a month
    https://murze.be/the-story-behind-our-open-source-efforts

    View Slide

  6. Postcardware

    View Slide

  7. Spatie

    Samberstraat 69D

    2060 Antwerp

    Belgium


    View Slide

  8. https://spatie.be/open-source/postcards

    View Slide

  9. Let's talk 

    about media

    View Slide

  10. The problem
    User uploaded content
    Where to store it all?
    How to retrieve it?
    How to optimize images?

    View Slide

  11. The problem
    Boring code to write
    Need the same things in every project
    Write it slightly different in each project

    View Slide

  12. Laravel 

    Medialibrary

    View Slide

  13. Laravel Medialibrary
    Associate files with Eloquent models
    Can group media into collections
    Image conversions
    Uses multiple filesystems

    View Slide

  14. Laravel Medialibrary
    Optimize converted images
    Custom image generators
    Customize directory structure
    Custom attributes

    View Slide

  15. https://docs.spatie.be/laravel-medialibrary

    View Slide

  16. View Slide

  17. Demo

    View Slide

  18. Wrapping up

    View Slide

  19. Resources
    https://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

    View Slide

  20. Future plans
    Vue components


    Uploads


    Nova Tool


    Release Q4 2018 - Q1 2019

    View Slide

  21. Teamwork
    Sebastian De Deyne

    @sebdedeyne


    Willem Van Bockstal

    @willemvbockstal


    Alex Vanderbist

    @alexvanderbist


    Brent Roose

    @brendt_gd

    View Slide

  22. Freek Van der Herten
    Partner & developer at SPATIE
    @freekmurze
    https://spatie.be
    https://ohdearapp.com
    https://fullstackeurope.com
    https://murze.be

    View Slide