Тёмный

Laravel Pipelines: Build an Api 

Jordan Dalton
Подписаться 1,9 тыс.
Просмотров 23 тыс.
50% 1

Pipelines were just introduced into Laravel core this past week. In this video I'll show you how to create a simple API using Laravel Pipelines. Enjoy!

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 57   
@ricardo.ramirez.r
@ricardo.ramirez.r Год назад
Nice! A side note: the sound is to low
@Daltoncast
@Daltoncast Год назад
Thank you. I"ll look into making the audio louder.
@YoKKJoni
@YoKKJoni 4 месяца назад
wayy to low.. unfortunatly because of this i am not watching this video rn.. and prob wornt watch it also..
@ricko13
@ricko13 6 месяцев назад
just me or the volume is so low?
@manishdeshpande
@manishdeshpande 4 часа назад
Lousy audio. Unable to comprehend what's being said.
@ripon59
@ripon59 2 месяца назад
well, same thing i achieved with a Trait file with The Builder Pattern process. which is clean too. Why should I use Pipeline especially?
@karlson2804
@karlson2804 Год назад
But how about the range data, between or =>,
@unnikrishnanadoor
@unnikrishnanadoor Месяц назад
can't hear anything very little sound
@sebastianscholz5395
@sebastianscholz5395 Год назад
Nice explanation! Why should I use this instead of just applying the "when" to my query builder directly? I think this makes the code harder to read with the pipelines.
@rahulxcr
@rahulxcr Год назад
Thanks that's very helpful.
@sudhirdhawle5370
@sudhirdhawle5370 5 месяцев назад
NO sound
@sashapinchuk5402
@sashapinchuk5402 6 месяцев назад
Nice video, but I have a simple question, can we use the __invoke method instead of the handle method in filter classes? Cuz for me is fiilling like the __invoke method more clear.
@laravelvuemedia
@laravelvuemedia Год назад
such a nice explanation I love it
@Daltoncast
@Daltoncast Год назад
Glad you liked it!
@antogkou
@antogkou Год назад
Great video! Pipelines are really becoming a clean code standard for Laravel.
@AtiqurRahman-n2i
@AtiqurRahman-n2i Год назад
Nice. Go ahead. The sound can be better.
@Daltoncast
@Daltoncast Год назад
Thank you. I'll look into making the audio louder.
@mariano.pualiu
@mariano.pualiu Год назад
I've always found pipelines processing fascinating, but I wonder how could I bifurcate the pipeline into 2 or more processes under some conditionals correctly, so far I've though to create new processing pipelines with in a pipeline accordingly to some respective conditionals
@everlastingheat7572
@everlastingheat7572 4 месяца назад
Thanks! Useful information
@shinichi9do
@shinichi9do 11 месяцев назад
I am sorry but the sound/volume is too low
@borakayalar
@borakayalar 10 месяцев назад
great and maybe you dont need to create filter class for each query parameters. Maybe you can parse request query strings and itrate them. Actualy this api is for internal using by developer such as datatables search etc... dev knows already query params. And I think you can manage with one filter class. Meanwhile it is a nice content many thanks.
@Daltoncast
@Daltoncast 10 месяцев назад
Thank you
@scotttresor
@scotttresor Год назад
thank for your video and great explanation about pipeline
@KasimSheyi
@KasimSheyi 6 месяцев назад
This is really cool.
@hasanablak
@hasanablak 20 дней назад
Thank you sir
@Daltoncast
@Daltoncast 20 дней назад
@@hasanablak glad I could help 😀
@Daltoncast
@Daltoncast 20 дней назад
@@hasanablak glad I could help 😀
@gabrielodadier2689
@gabrielodadier2689 Год назад
Nicely done, i think i will start using pipelines now. Great video
@TheMarcelitto
@TheMarcelitto 5 месяцев назад
Nice!
@hassan_codes
@hassan_codes 9 месяцев назад
Thsnk you John, you've shown me thst I know nothing. Gracias 😢
@Daltoncast
@Daltoncast 9 месяцев назад
I’m glad you found value from the content. 😃
@arafat1249
@arafat1249 9 месяцев назад
nice one
@collenzaligway4458
@collenzaligway4458 11 месяцев назад
Nice tutorial Mate, keep going I really love your videos.
@Daltoncast
@Daltoncast 11 месяцев назад
Thank you so much!
@ikarolaborda726
@ikarolaborda726 Год назад
My rule number one: NEVER use model methods in controllers. Controllers shouldn’t even know the models exist. Either use services or action classes, and of course, repository (believe it or not, there were times when i had to avoid using eloquent) But, excellent example anyway. You’ve used cpp and other stuff most PHP devs don’t even know of
@hassan_codes
@hassan_codes 9 месяцев назад
Service classes are my go-to. I too avoid using Eloquent when dealing with "complex" queries. I started doing that after learning how Eloquent parses and builds it queries
@nicknamexd9789
@nicknamexd9789 4 месяца назад
How about resources?
@shaungbhone8368
@shaungbhone8368 Год назад
Nice🎉 clean and understand. What a amazing content.
@jeffbee6090
@jeffbee6090 Год назад
this is great! thanks! love the clean code
@Daltoncast
@Daltoncast Год назад
Thanks, Jeff! Glad you enjoyed the content.
@vhpm18
@vhpm18 Год назад
Excelent
@borakayalar
@borakayalar 10 месяцев назад
I am so sorry Jordan I sad before anyone does not tell about service containers , providers , etc... I found you and I am watching your contents and you have contents for them. many many thanks
@Daltoncast
@Daltoncast 10 месяцев назад
Feel free to let me know if there are specific topics you’d like me to cover 😀
@borakayalar
@borakayalar 10 месяцев назад
Maybe you can tell about dynamic database connection according to user profile.(it is so specific I know that many times we are making CURD apps and that apps so boring :) ) I have a project like that. I can covered it out in one week. coz I am new on laravel. Then I found my problem about it. Middleware sequences were wrong :) logic was when user register to main app than main app create a db for user than user login own admin panel and that panel uses to db of user. it was hard to for me via laravel :) by the way you can take videos about complex project in real life. I dont mean hard codding. The approching or create a application logics@@Daltoncast
@borakayalar
@borakayalar 10 месяцев назад
meanwhie sorry for my bad english :)
@DilipKumar-bf4vv
@DilipKumar-bf4vv Год назад
Nice explanations. Thanks
@Daltoncast
@Daltoncast Год назад
Awesome! I’m glad you found it helpful.
@chrispian
@chrispian Год назад
Great example!! Thanks for sharing.
@Daltoncast
@Daltoncast Год назад
Thank you!
@gssj-o8p
@gssj-o8p Год назад
It's a good explanation of how pipelines work in Laravel, they are basically the Chain of Responsability design pattern being applied using Laravel's contract. However this example should be used as an example only since it's totally unecessary to use Pipelines for such situation as building a query. In this case just use ->when() directly without pipes.
@YusnielBrocard
@YusnielBrocard Год назад
Nice example
@Daltoncast
@Daltoncast Год назад
Thank you
@creative2brains882
@creative2brains882 Год назад
That is great clean code
@creative2brains882
@creative2brains882 Год назад
you can do this class UserFilters { public function __construct(protected Request $request) { } public function handle(Builder $builder, Closure $next) { return $next($builder) ->when($this->request->has('name'), fn ($query) => $query->where('name', 'REGEXP', $this->request->name)) ->when($this->request->has('email'), fn ($query) => $query->where('email', 'REGEXP', $this->request->email)) ->when($this->request->has('bod'), fn ($query) => $query->where('bod', 'REGEXP', $this->request->bod)); } }
@Khader-1
@Khader-1 Год назад
Great by all means! keep it going, Subscription earned
@Samuel.Mwangi
@Samuel.Mwangi Год назад
Happy birthday @Jordan. Subscription earned 🫡
@Daltoncast
@Daltoncast Год назад
Thank you, Samuel!
Далее
Laravel's secret weapon: macros (watch me code)
23:46
Laravel SPA Authentication - setup and common mistakes
16:55
БЕЛКА ЗВОНИТ ДРУГУ#cat
00:20
Просмотров 355 тыс.
Laravel Code Review: Why NOT Use Repository Pattern?
14:21
Authorization in Laravel: Can You Do That?
8:29
Просмотров 9 тыс.
Can You Make YouTube From Scratch Using Only Bash?
17:51
🚀 Writing better code with Pipelines - Laravel
9:28
I build a TODO list app with Laravel in 17 minutes.
17:58
Laravel + Livewire todo app (and so much more)
16:41
Просмотров 45 тыс.