PHP Attributes - Simple Router With Attributes - Full PHP 8 Tutorial

preview_player
Показать описание
Attributes feature that was introduced in PHP 8.0 may sound complicated but it's pretty simple when you put it into practice. In this video, we explore the attributes feature & refactor our simple router to use attributes.

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
THANK YOU!

🛠️ TOOLS & SERVICES I USE

COURSE PLAYLIST

RESOURCES

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
Рекомендации по теме
Комментарии
Автор

I was planning on buying a PHP course on udemy because I want to enhance my php knowledge. I'm a laravel developer and I feel like I already forgot the most part of pure php. I'm glad I found this series, and its FREE!! Thank you!

aeiou...
Автор

A more difficult subject to get into, since the php doc itself that you showed at the start of the video, is not very explanatory or clear about what attributes are and how they work.
After seeing this lesson through and making the effort to code along with you I am now confident that I understand it enough to be able to use it.
What made it clear for was that you showed that Attribute is just another class you can use and extend by creating your own Attribute classes.
In the end it didn't seem difficult anymore and that shows me you're a great teacher.
Thanks, Gio. Top job.

hansschuijff
Автор

This course is extremely useful if someone would like to dive right into PHP. Thanks a million!

Vitalii-mr
Автор

For being an awesome technical teacher!

aymanaoun
Автор

Quality, modern PHP stuff, keep it up.

gaborjonas
Автор

This is the best attributes explanation! Thank you for sharing!

kinvain
Автор

You just described the topic perfectly 👌🏻🙏🏻

reza.kargar
Автор

This whole tutorial playlist is outstanding. Learning a lot of things from you. Thank you !!!
Would you make a video on when to use a framework, If the problems can be solved with vanilla PHP then is it worth to do it with framework? I know framework increases the development speed. But using it for smaller projects ? What are your opinions I would love to hear it.

iambasanta
Автор

Thanks you very very much! you are the best)

ЯоКуассиЖан-Клод
Автор

Wow, this one was pretty cool. I'm like seeing how we are advancing and yet you always seem to say that it can't be used in production... and I'm like, men there must be a ton of things to learn. I followed and have updated my router class. Thanks Gio. Awesome. I'm moving on...

Zubbee
Автор

hmm, you are awesome.
other speakers tell about his vacation, mood, dogs and at the end about php attributes )))
thank you

alextc
Автор

im really amazed the information you have how did you get all these knowledge please !

drcodr
Автор

Realy how Could this playlist are for free!!!! God save you . And realy we are apperciate your effort thaks alot

hossamragab
Автор

Hello, you make really great videos and I look at them with great enthusiasm. But one thing I miss here, namely: independent of a 3rd framework (such as Slim), how could you form a group here with the router class? I lack this here and also the know-how for it. I would be very happy if you could also make a separate video for this. Thank you in advance.

MrLion
Автор

Amazing video as always!!! Please could you create a version two of this video with parameters. It's something i just can't get my head around. Some store it in a $request->getParams(), others have it public function($param1, $param2) etc. Would be extremely helpful. Thankyou!!!! :)

holdenjack
Автор

Bro, i have one problem. At timestamp 12:23, I set the attribute This works fine when the url has "/examples/generator" but fails when the url has the ending "/" like "/examples/generator/". I tried defining 2 attributes with the second one having the ending "/" and yet it failed stating i cannot have duplicate attributes. How do i address this problem?

truthteachers
Автор

For simplesity and perfermance, In this case of routing I prefer to include a config file return array of all routes and merge it with array variable in the Route::class

lahoucineoldakdim
Автор

has a nested loop it can be very slow if you have many routes + many http requests. This method is called in every http request right?

cirhanne
Автор

gI have made a conditional listing in this coding, but what I want to do is to find the selected data from the database and have it listed, for example, when the pediatric service is selected, the patients hospitalized in the pediatric service will be listed.

enderozata
Автор

Can we expect "Laravel the right way" with some awesome project ?

_nirajghimire
visit shbcf.ru