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

The Laravel Core - Demystify The Beast (LaravelLive UK)

The Laravel Core - Demystify The Beast (LaravelLive UK)

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

June 10, 2019
Tweet

More Decks by Christoph Rumpel

Other Decks in Technology

Transcript

  1. The Laravel Core
    Demystify The Beast

    View Slide

  2. @christophrumpel
    Expressive syntax
    Easy to start
    You can develop fast
    Developer UX
    LARAVEL IS AWESOME

    View Slide

  3. @christophrumpel
    Huge and complex
    Uses Tricks
    Confusing
    BUT

    View Slide

  4. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  8. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

  9. Send It Back
    Handle Request
    Boot Laravel
    HTTP Request

    View Slide

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

    View Slide

  11. @christophrumpel

    View Slide

  12. @christophrumpel

    View Slide

  13. @christophrumpel

    View Slide

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

    View Slide

  15. @christophrumpel

    View Slide

  16. @christophrumpel

    View Slide

  17. @christophrumpel

    View Slide

  18. @christophrumpel

    View Slide

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

    View Slide

  20. @christophrumpel

    View Slide

  21. @christophrumpel

    View Slide

  22. @christophrumpel

    View Slide

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

    View Slide

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

    View Slide

  25. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

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

    View Slide

  27. @christophrumpel
    Misleading
    Hard to test
    Tightly coupled
    Bad practice
    OR

    View Slide

  28. @christophrumpel
    OUR EXAMPLE

    View Slide

  29. @christophrumpel
    REQUEST FACADE
    Illuminate/Support/Facades/Request.php

    View Slide

  30. @christophrumpel
    BASE FACADE
    Illuminate/Support/Facades/Facade.php

    View Slide

  31. @christophrumpel
    BASE FACADE
    Illuminate/Support/Facades/Facade.php

    View Slide

  32. @christophrumpel
    BASE FACADE
    Illuminate/Support/Facades/Facade.php

    View Slide

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

    View Slide

  34. @christophrumpel
    OUR EXAMPLE

    View Slide

  35. @christophrumpel
    Misleading
    Hard to test
    Tightly coupled
    Bad practice
    TRUE OR FALSE

    View Slide

  36. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

  37. @christophrumpel
    ORM
    Active Record
    Models
    Builder
    ELOQUENT

    View Slide

  38. @christophrumpel
    DATABASE

    View Slide

  39. @christophrumpel
    OUR EXAMPLE

    View Slide

  40. @christophrumpel
    OUR EXAMPLE

    View Slide

  41. @christophrumpel
    CONFERENCE MODEL

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  45. @christophrumpel
    FOUND IT
    Eloquent/Builder.php

    View Slide

  46. @christophrumpel
    OUR EXAMPLE

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  50. @christophrumpel
    OUR EXAMPLE

    View Slide

  51. @christophrumpel
    NO SPEAKERS PROPERTY

    View Slide

  52. @christophrumpel
    Content-Security-Policy: policy
    NO SPEAKERS PROPERTY
    Illuminate/Database/Eloquent/Model.php

    View Slide

  53. @christophrumpel
    CHECK ATTRIBUTES
    Base Eloquent Model HasAttribute concern

    View Slide

  54. @christophrumpel
    CHECK ATTRIBUTES
    Base Eloquent Model HasAttribute concern

    View Slide

  55. @christophrumpel

    View Slide

  56. @christophrumpel

    View Slide

  57. @christophrumpel
    OUR EXAMPLE

    View Slide

  58. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

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

    View Slide

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

    View Slide

  61. @christophrumpel
    A Conference is about people.

    View Slide

  62. @christophrumpel
    QUESTIONS?

    View Slide

  63. @christophrumpel
    https://laravelcoreadventures.com
    https://christoph-rumpel.com
    https://speakerdeck.com/christophrumpel
    https://store.christoph-rumpel.com
    RESOURCES

    View Slide