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

The Laravel Core - Demystify The Beast (Laracon EU Madrid)

The Laravel Core - Demystify The Beast (Laracon EU Madrid)

Laravel is a fascinating and complex piece of software. It helps us to work fast, solid and secure on our modern PHP applications. But how often do you find yourself taking a look under the hood of Laravel?

Knowing your framework is not something you need to learn right away. Maybe you’re even fine without knowing it at all. But the day you start asking questions about how it works, is the day you start improving. Knowing your framework will make you a better developer.

In this talk, I want to take you on a little journey through the core of the Laravel framework. It is like the best-of compilation of my free video-series Laravel Core Adventures, where I dig with you through the main concepts and implementations of the Laravel framework.

This talk is for everyone who works with Laravel and is interested in learning more about this powerful PHP framework. You will come away with a better understanding of Laravel's core.

Christoph Rumpel

May 24, 2019
Tweet

More Decks by Christoph Rumpel

Other Decks in Education

Transcript

  1. The Laravel Core
    Demystify The Beast

    View full-size slide

  2. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View full-size slide

  3. @christophrumpel
    WHY DO I CARE
    ABOUT THE CORE?

    View full-size slide

  4. @christophrumpel
    It is a tool
    It takes a lot of time
    It can be overwhelming
    COMMON EXCUSES

    View full-size slide

  5. @christophrumpel
    It speaks to you
    Debugging
    Learn from the best
    Become a better dev
    WHY YOU SHOULD CARE

    View full-size slide

  6. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View full-size slide

  7. @christophrumpel
    Entry point for request
    Boot Laravel
    Handle request
    Create response
    REQUEST LIFE-CYCLE

    View full-size slide

  8. @christophrumpel
    LET IT BEGIN
    public/index.php

    View full-size slide

  9. @christophrumpel

    View full-size slide

  10. @christophrumpel

    View full-size slide

  11. @christophrumpel

    View full-size slide

  12. @christophrumpel
    Application instance
    Also serves as DIC
    Bind kernels to the container
    Register Base Providers
    Set base paths

    View full-size slide

  13. @christophrumpel

    View full-size slide

  14. @christophrumpel

    View full-size slide

  15. @christophrumpel

    View full-size slide

  16. @christophrumpel

    View full-size slide

  17. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Foundation/Http/Kernel.php

    View full-size slide

  18. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Foundation/Http/Kernel.php

    View full-size slide

  19. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Foundation/Http/Kernel.php

    View full-size slide

  20. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Foundation/Http/Kernel.php

    View full-size slide

  21. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Routing/Router.php

    View full-size slide

  22. @christophrumpel
    REQUEST & ROUTER
    Illuminate/Routing/Router.php

    View full-size slide

  23. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View full-size slide

  24. @christophrumpel
    Magic
    Proxies
    Helpers
    Static interfaces
    Service Container
    FACADES ARE

    View full-size slide

  25. @christophrumpel
    Misleading
    Hard to test
    Tightly coupled
    OR

    View full-size slide

  26. @christophrumpel
    OUR EXAMPLE

    View full-size slide

  27. @christophrumpel
    REQUEST FACADE

    View full-size slide

  28. @christophrumpel
    BASE FACADE

    View full-size slide

  29. @christophrumpel
    BASE FACADE

    View full-size slide

  30. @christophrumpel
    BASE FACADE

    View full-size slide

  31. @christophrumpel
    FOUND IT
    Illuminate/Http/Request.php

    View full-size slide

  32. @christophrumpel
    Misleading
    Hard to test
    Tightly coupled
    TRUE OR FALSE

    View full-size slide

  33. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View full-size slide

  34. @christophrumpel
    ORM
    Active Record
    Models
    Builder
    ELOQUENT

    View full-size slide

  35. @christophrumpel
    DATABASE

    View full-size slide

  36. @christophrumpel
    OUR EXAMPLE

    View full-size slide

  37. @christophrumpel
    GET A CONFERENCE

    View full-size slide

  38. @christophrumpel
    CONFERENCE MODEL

    View full-size slide

  39. @christophrumpel
    STATIC WHERE METHOD DOES NOT EXIST
    Illuminate/Database/Eloquent/Model.php

    View full-size slide

  40. @christophrumpel
    STILL NO WHERE METHOD
    Illuminate/Database/Eloquent/Model.php

    View full-size slide

  41. @christophrumpel
    STILL NO WHERE METHOD
    Illuminate/Database/Eloquent/Model.php

    View full-size slide

  42. @christophrumpel
    FOUND IT
    Eloquent/Builder.php

    View full-size slide

  43. @christophrumpel
    GET A CONFERENCE

    View full-size slide

  44. @christophrumpel
    GET FIRST CONFERENCE
    Eloquent/Builder trait BuildsQueries

    View full-size slide

  45. @christophrumpel
    GET SPEAKERS FROM CONFERENCE

    View full-size slide

  46. @christophrumpel
    NO SPEAKERS PROPERTY

    View full-size slide

  47. @christophrumpel
    NO SPEAKERS PROPERTY
    Base Eloquent Model

    View full-size slide

  48. @christophrumpel
    CHECK ATTRIBUTES
    Base Eloquent Model HasAttribute concern

    View full-size slide

  49. @christophrumpel

    View full-size slide

  50. @christophrumpel

    View full-size slide

  51. @christophrumpel
    OUR EXAMPLE

    View full-size slide

  52. @christophrumpel
    Master your tools.
    Laravel is one of them.

    View full-size slide

  53. @christophrumpel
    NO SPEAKERS PROPERTY
    Base Eloquent Model
    Laravel Core
    Adventures
    https://laravelcoreadventures.com
    @christophrumpel

    View full-size slide