From now on I can't forget the name Max. Max the PHP routing master.. thank you ..en like the voice - audible enough to make me understand.. thanks once more again
@MaxPronko2 жыл бұрын
Thanks a lot for your feedback
@4rmboy11 ай бұрын
The most useful video demonstrating the MVC pattert in php that i watched so far.
@MaxPronko7 ай бұрын
Thanks
@tusharnain66526 ай бұрын
I am not gonna use any framework for my freelance projects, ever again. Thanks to you! ❤
@marshalldteach11092 жыл бұрын
I always use a framework because of routing but for my small projects, it's kind a overkill. So this is perfect for my next project. Thanks Max
@MaxPronko2 жыл бұрын
Thanks for the feedback.
@MrJBisoy3 жыл бұрын
Can you add dynamic routing along with pattern match ??
@dieselkapasule43702 жыл бұрын
Thanks a lot, Max, quite a helpful video.
@ersinbx1811 Жыл бұрын
There is no index.php in the home directory, how does it work? I got stuck at 1:45. The requested resource / was not found on this server.
@MaxPronko Жыл бұрын
The index.php is located in the public folder, that is a document root
@ersinbx1811 Жыл бұрын
@@MaxPronko thanks, cd public
@MrLinuxFreak3 жыл бұрын
great guide! can you do a guide about adding middlewares? particularly for validate requests values
@lorenzochukwuebukaobi88983 жыл бұрын
Thank you so much for this video it was helpful. How do you add http headers using this routing system to prevent cors errors when building an API?
@NhatNguyen-xo9gs3 жыл бұрын
It is useful. Thank you for sharing
@MaxPronko3 жыл бұрын
Thanks for watching!)
@andgoedu2 жыл бұрын
Thanks alot mate it actually works
@MaxPronko2 жыл бұрын
Happy it works!!!
@entertainyou18552 жыл бұрын
Can you share the source code used here
@kelolettek39272 жыл бұрын
Hi how to include css file to phtml please I cant find
@luckydev39112 жыл бұрын
www.w3schools.com/Tags/tag_link.asp
@petrusmattiasdughem1899 Жыл бұрын
Hello can you use php built in webserver and connect to database?
@MaxPronko Жыл бұрын
Yes, why not?
@outerstring87473 жыл бұрын
awesome i would interested to see a whole MVC framework😍
@MaxPronko Жыл бұрын
Great idea
@catch_me_outside_how_bout_dat2 жыл бұрын
I am confused. How does the passing an array named params to a callback function associate the variable to the incoming request query params?
@lucassouzasilva68423 жыл бұрын
Hey this help me so much thanks
@grumpyjarl73362 жыл бұрын
dude how can you handle scenario of items/{item-id} in this aproach ? thanx
@MaxPronko2 жыл бұрын
Are you looking to add a parameter for a GET request?
@basisit35113 жыл бұрын
Thanks, I´m currently learning the http_foundation and your lesson helped alot understanding how it works! thanks! BUT why? why do it like this? It gives us an object orientatet way of doing things, but it seems like a lot of hassle for doing it like this....... so why do it like this? is it more secure or?
@MaxPronko3 жыл бұрын
What do you mean when asking your question?
@basisit35113 жыл бұрын
@@MaxPronko :-) I dont understand why we should use http_foundation?
@PrakashPrakash-sn3do3 жыл бұрын
Awesome information Thank you so much
@MaxPronko3 жыл бұрын
Thank you
@asifurrahman54362 жыл бұрын
Hey after implementing the router i am getting a database erro saying: "Database Error: could not find driver", please help me
@MaxPronko2 жыл бұрын
Have you sorted the issue?
@zeeu2 жыл бұрын
hello, I created a custom router like this, it works on php local server, but the problem is that it don't work on XAMPP and 000webhost, only the home page works
@MaxPronko2 жыл бұрын
You should enable mod_rewrite module if you use Apache
@manishdeshpande3 жыл бұрын
Hi Max, Can you provide the link to the code in the video? Thanks much.
@fatkur2 жыл бұрын
so cool dude!
@MaxPronko2 жыл бұрын
Thanks
@faratanzaki11 ай бұрын
Hi sir it's helpful for me because i even build a complete script with it, but i came to blog post part in which i was stuck on how to make it pass variable to the routher like that get(/post/{$id}, Post::class.'::index') but it is not working pls how would i implement it like that
@MaxPronko11 ай бұрын
Let me record a video and explain
@faratanzaki11 ай бұрын
@@MaxPronko ok Sir thanks we are waiting Sir
@trevorchristianamedayenou19822 жыл бұрын
Hi Max Thank you very much for your tutorial. It has been really helpful for me. Instead of using Laravel which is a huge framework for just creating a simple website, your tutorial is indeed great. My question here is about twig, I would like to add twig in your tutorial but I kind of a bit lost. I would appreciate if you can give me some guidelines. Thanks!
@saifulbayan95973 жыл бұрын
Hi Max, Thanks for Great Video. I have some question about this router in php w/o libraries: 1. how to implement other http verb like PUT, PAtCH or DELETE to make the router restfull? 2. if i have some placeholder in Request URI param, how to replace it with some string i wanted. For example when i want make custom slug: $router->get('/post/{slug}, Post::class, postDetail($param)), and goal URI i wanted just like this /post/awesome-post. is possible to achieve that with that approach?
@MaxPronko Жыл бұрын
It is possible
@rssimran48002 жыл бұрын
Where is source code
@MaxPronko2 жыл бұрын
It should be on my github mcspronko
@paulhetherington3854 Жыл бұрын
PHP' = Her personal productive! American Tribes
@iuseronline10 ай бұрын
Акцент шик))))
@MaxPronko10 ай бұрын
Дякую👍
@ashmoore37093 жыл бұрын
First :D
@ashmoore37093 жыл бұрын
This is brilliant and very useful. Thanks again for all your hard work Max :)
@MaxPronko3 жыл бұрын
Thanks Ash for the feedback. It means a lot to me.
@olezhonnv32153 жыл бұрын
Єврейський трохи роутер. Але більш-менш. Над вимовою попрацюй. Або веди канал на рідній мові.
@MaxPronko3 жыл бұрын
Дивись канали на рідній мові, бо може щось не зрозуміло буде.
@giorgiobarone97842 жыл бұрын
Hi nice work! I've followed all the video and I created a system as you taught. Some advice about passing parameters like users/$name/$surname ? Thanks
@MaxPronko2 жыл бұрын
What use case do you want to achieve with name/surname?
@giorgiobarone97842 жыл бұрын
@@MaxPronko hi, that is just an example. I said $name and $surname just as an example but I would have said $slug, $id... The use would be the same as codeigniter routing or laravel routing. I'm looking for more examples and I'm seeing it needs to use regex to interpreting signs like {$id}
@giorgiobarone97842 жыл бұрын
@@MaxPronko Searching here and there, I tried to modify the code in this way, I paste here just the foreach inside the route method. There is always something wrong, can you give me some tips? Thank you! foreach($handlers as $handler): $params_values = []; $params_keys = []; preg_match_all("/(?
@faratanzaki11 ай бұрын
like this one : $router->get('/contact/{$id}', function($param){ echo $param; });
@khaledeladawe77692 жыл бұрын
call_user_func_array($callback, [ array_merge($_GET, $_POST) ]); it's not working I have this error: GET /about - Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, no array or stri ng given
@MaxPronko2 жыл бұрын
It looks like your callback wasn’t setup properly, please check the code before this call.