Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Handling media in a Laravel app (Apeldoorn)

Handling media in a Laravel app (Apeldoorn)

Freek Van der Herten

September 26, 2019
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://flareapp.io
    https://ohdear.app
    https://freek.dev

    View Slide

  3. Open source
    software

    View Slide

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

    View Slide

  5. Some statistics on our open source work
    ± 250 public repositories on GitHub
    August 2016: ± 800 000 downloads
    August 2017: ± 5 000 000 downloads
    August 2018: ± 17 000 000 downloads
    August 2019: ± 45 000 000 downloads
    ± 2 700 000 downloads a month
    https://freek.dev/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://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
    JavaScript components


    Uploads


    Release Q1 2020

    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://flareapp.io
    https://ohdear.app
    https://freek.dev

    View Slide