WOW! Laravel's pipeline pattern is AWESOME

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • Hi guys!
    In this video series, I'll try to showcase two good usecases for the pipeline pattern
    More me:
    przemyslawprzy...
    Saaslaravel:
    saaslaravel.com

ความคิดเห็น • 28

  • @thirdvect0r
    @thirdvect0r ปีที่แล้ว +19

    The best "advanced" laravel vids on youtube right now! I've been building laravel projects for 5 years and I still learn something from every video you upload, thanks for the great content

    • @saaslaravel
      @saaslaravel  ปีที่แล้ว +3

      Comments like that make my day! Thank you so much and glad it was valuable

  • @sayatkaldarbekov3474
    @sayatkaldarbekov3474 ปีที่แล้ว +1

    Never thought that filters may be implemented in such a nice pattern. I always made filtering through hard sql queries in repository. Keep going, your videos are the best laravel content on youtube!

  • @johnapuuli2545
    @johnapuuli2545 8 หลายเดือนก่อน

    Damn, I have loved how this guy thinks through, punctures and re-evaluates his decision and progress, a sure skills problem-solving mental processes, "THANKS"

  • @ngetichishmael
    @ngetichishmael ปีที่แล้ว +2

    This is awesome. Big up.

  • @thecyrilcril
    @thecyrilcril 8 หลายเดือนก่อน

    IMO the filters example is a bit over-engineered but the Onboard is superb! by the way I used these often...great video

  • @icantchosemyname
    @icantchosemyname 4 หลายเดือนก่อน

    I didn’t know about pipeline but i think laravel provides the "when()" method on query builder instances.
    It’s simple and "eloquent" (pun intended 😂 ) i think but you probably already know about it.
    Your post seems to be for demonstrating the pipeline tool, thanks.

  • @troneras-tv
    @troneras-tv 11 หลายเดือนก่อน

    Very good video and channel! I'm thinking to use this to refactor our registration process

  • @impulserr
    @impulserr 7 หลายเดือนก่อน

    Nice pattern, I will maybe try it out ;)

  • @sarajitbarmon5149
    @sarajitbarmon5149 18 วันที่ผ่านมา

    Awesome

  • @gidaban79
    @gidaban79 ปีที่แล้ว

    Great show. And waiting for more :)

  • @abdulrehman-it7rp
    @abdulrehman-it7rp 2 หลายเดือนก่อน

    Plz explain why you are using such complex things pipelines, ___invoke function,
    Just if condition for fillter , and if it is too mush code put it in traits

  • @trevormanhuwa
    @trevormanhuwa ปีที่แล้ว +1

    Ey, I love your videos, can you kindly make a video specifically for roles, and tag me on it. 😊

    • @saaslaravel
      @saaslaravel  ปีที่แล้ว +1

      Hi Trevor! I already have two videos on permissions & roles, you may want to check them out

  • @ericvaldez174
    @ericvaldez174 ปีที่แล้ว

    its awesome, it also looks like criteria in l5 repository package

  • @99Spyder99
    @99Spyder99 5 หลายเดือนก่อน

    Can this be implemented with repository pattern? to have for example in EmojiRepository in the function getFilterableEmojis() can we move here the logic with the pipeline to return just $filterable->builder->get() and in the controller to have like return EmojiResource::collection(
    $emojiRepository->getFilterableEmojis($request)
    );

  • @iFunkMasterJ
    @iFunkMasterJ ปีที่แล้ว

    Loving the VSCode setup (looks like VSCode?).
    What’s you’re setup?

    • @saaslaravel
      @saaslaravel  ปีที่แล้ว +1

      It's actually PhpStorm with Catpuccin theme

  • @tostrinjj
    @tostrinjj ปีที่แล้ว

    Very nice vid, thanks

  • @victortodoran1828
    @victortodoran1828 ปีที่แล้ว +2

    Like with a lot of other stuff in Laravel
    There was no need to reinvent the Chain Of Responsibility pattern and slap the name Pipeline on it.
    Any developer(java, php, C#) worth their salt knows about the chain of responsibility pattern, I don’t think the same can be said about this Pipeline thingy.
    I’m not even going to go into the world of complexity that is the query building example.
    That being said, thanks for putting the effort of making this video, I learned something new and I appreciate it.

    • @saaslaravel
      @saaslaravel  ปีที่แล้ว

      I mean you are right - this is CoR, but Laravel called it differently. My purpose here is to show the tools available in the framework.
      The thing is that depending on your usecase a tool can be good or bad. When defining a super complex query that has a bunch of filters, this abstraction works pretty great for me.

  • @free2idol1
    @free2idol1 ปีที่แล้ว

    13:30 is passing the whole $request to DTO recommended practice? I've known that representation layer should not be aware of the request object.

    • @saaslaravel
      @saaslaravel  ปีที่แล้ว +2

      So the request itself is not passed to the DTO but to the static function that bootstraps the object. The DTO itself doesn't have a request property or access to it, it's just a helper that bootstraps the class from it that I like to use for convenience as they are usually tied to each other more or less. So often times I'd just have a bunch of these i.e. fromArray, fromRequest, fromCollection etc.

  • @mohamedabidi9870
    @mohamedabidi9870 ปีที่แล้ว +1

    nice

  • @dyrossaur
    @dyrossaur 3 หลายเดือนก่อน

    Use handle() method instead, not the __invoke().

  • @ramazanaktas748
    @ramazanaktas748 หลายเดือนก่อน

    Holy f I was trying to build my own

  • @dmitriykret8938
    @dmitriykret8938 ปีที่แล้ว +1

    👍

  • @sameer7100
    @sameer7100 7 หลายเดือนก่อน

    issue with the code. at 2:42 message said "Naughty boy" but what if the user is a girl or worse a LGbTV++ or something 😉. PS: it's just a joke and Your code is good thanks for vid.