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

NomadPHP - The Laravel Core - Demystify The Beast

NomadPHP - The Laravel Core - Demystify The Beast

Christoph Rumpel

January 14, 2021
Tweet

More Decks by Christoph Rumpel

Other Decks in Technology

Transcript

  1. The Laravel Core
    Demystify The Beast

    View Slide

  2. View Slide

  3. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  7. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

  8. Send It Back
    Handle Request
    Boot Laravel
    Browser / HTTP Request

    View Slide

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

    View Slide

  10. @christophrumpel

    View Slide

  11. @christophrumpel

    View Slide

  12. @christophrumpel

    View Slide

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

    View Slide

  14. @christophrumpel

    View Slide

  15. @christophrumpel

    View Slide

  16. @christophrumpel

    View Slide

  17. @christophrumpel

    View Slide

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

    View Slide

  19. @christophrumpel

    View Slide

  20. @christophrumpel

    View Slide

  21. @christophrumpel

    View Slide

  22. @christophrumpel
    APP
    MIDDLEWARE A
    MIDDLEWARE B
    REQUEST RESPONSE

    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
    SAME AS

    View Slide

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

    View Slide

  37. @christophrumpel
    TESTING NOTIFICATIONS

    View Slide

  38. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

  39. @christophrumpel
    ORM
    Active Record
    Models
    Builder
    ELOQUENT

    View Slide

  40. @christophrumpel
    DATABASE

    View Slide

  41. @christophrumpel
    OUR EXAMPLE

    View Slide

  42. @christophrumpel
    OUR EXAMPLE

    View Slide

  43. @christophrumpel
    CONFERENCE MODEL

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  47. @christophrumpel
    FOUND IT
    Eloquent/Builder.php

    View Slide

  48. @christophrumpel
    OUR EXAMPLE

    View Slide

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

    View Slide

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

    View Slide

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

    View Slide

  52. @christophrumpel
    OUR EXAMPLE

    View Slide

  53. @christophrumpel
    NO SPEAKERS PROPERTY

    View Slide

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

    View Slide

  55. @christophrumpel
    CHECK ATTRIBUTES
    Base Eloquent Model HasAttribute concern

    View Slide

  56. @christophrumpel
    CHECK ATTRIBUTES
    Base Eloquent Model HasAttribute concern

    View Slide

  57. @christophrumpel

    View Slide

  58. @christophrumpel

    View Slide

  59. @christophrumpel
    OUR EXAMPLE

    View Slide

  60. @christophrumpel
    OUR EXAMPLE
    Conference Model

    View Slide

  61. @christophrumpel
    OUR EXAMPLE
    Eloquent Builder

    View Slide

  62. @christophrumpel
    OUR EXAMPLE
    Eloquent Builder

    View Slide

  63. @christophrumpel
    OUR EXAMPLE
    Conference Model

    View Slide

  64. @christophrumpel
    OUR JOURNEY
    LifeCycle Facades Eloquent

    View Slide

  65. @christophrumpel
    Master your tools.
    Your Framework is one of them.

    View Slide

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

    View Slide

  67. @christophrumpel

    View Slide

  68. @christophrumpel
    HTTPS://LARAVELCOREADVENTURES.COM
    15% DISCOUNT
    "LCA-LOVES-NOMADPHP"

    View Slide

  69. @christophrumpel
    MASTERING PHPSTROM

    View Slide

  70. @christophrumpel
    MASTERING PHPSTROM
    HTTPS://MASTERINGPHPSTORM.COM/

    View Slide

  71. @christophrumpel
    https://divinglaravel.com
    https://christoph-rumpel.com
    https://laravelcoreadventures.com
    https://christoph-rumpel.com/speaking
    https://speakerdeck.com/christophrumpel
    RESOURCES

    View Slide