PHP traits in depth with examples - OOP in PHP | Part 9

preview_player
Показать описание
In the following video, it is explained what is PHP Traits, how to create and use them.

Showing examples of:
- Multiple Traits
- Traits and inheritance
- Abstract methods in traits
- How to convert code using traits
- How Laravel uses traits

Useful links:

Follow me on social media:
Рекомендации по теме
Комментарии
Автор

Very good, congrats.... I'm Brazilian and I liked alot your ability to teatch.

B_G-Y.T
Автор

UHHHH G.. with no fear i can say that you are the best tutor ever that i ran into by far. Congrats man, keep up the good work!!!
You absolutely deserve more subscribes (y)

Manos
Автор

There was a very cool example with the Avengers.Hello from Russia

Kai-xcqu
Автор

This class was great! Thanks. New subscriber.

jesuslagrave
Автор

Really educative. Looking forward for more vids!

saikalbiev
Автор

Thank you, this was really helpful, your generous hard work was appreciated. May God bless you.

Protick
Автор

Great, simple and direct to the point. 14:38 when u said " This is absolutely valid code". i was like :D

burakkartal
Автор

Thanks to you I am watching the avengers end game again haha. That part liftTheHammer() was just amazing. Keep up the good work. Every scenario and problems using traits was well explained

swastikrocker
Автор

Thank you. This is an awesome video course.

azizbeknurmuhammadov
Автор

your examples are awesome you explanation..

shaikhanuman
Автор

Awesome tutorial. Plain should be spelt as plane.

jeffreysacco
Автор

Very good advice my friend. Thank you.

ivofrancisco
Автор

Typo: Plane, not Plain. Good video :)

pepeback
Автор

thanks, that was helpful. traits can solve duplication and single inheritance, alright. according to your examples, i have a feeling, that you also can mess things up big time :D ... i might going to use it to deduplicate some code in models.

kayoscreed
Автор

I really like this video I m taking your courses to begin some design pattern I hope if you could use a module on yii on your eCommerce project it will be a great thing for now I m doing that to isolate code and doing branches with GitHub for each module separated than the other.

Raezon_
Автор

15:07 why there is "Hello from class AHello from trait A" not "Hello from trait AHello from class A"?

SPOKOZE
Автор

I have a question, interfaces also accepts multiple inheritance, so what's the difference between interfaces and traits?

jihadabdulrazaq
Автор

6:56 I would like use abstract class or interface sir. What difference

adipurnomo
Автор

In simple words is like a reusable component but for functions? i'm right? nice series of videos btw

cristhianjhlcom
Автор

So traits in php are analogous to interfaces in java?

mohammadhosein