Routing, Controllers, Views - Part 1 | PHP MVC Framework from Scratch

  Рет қаралды 155,500

The Codeholic

The Codeholic

Күн бұрын

🔥🔥🔥 Check my full course "Build and Deploy Laravel E-commerce Website with Vue.js Admin Panel" at thecodeholic.com 🔥🔥🔥
I have built an MVC framework on PHP from scratch.
In this video we will implement custom routing, Controllers, Views, Layouts.
⭐⭐Source code⭐⭐
github.com/the...
Here are several features of the framework:
Custom Routing
Composer
Controllers
Views/Layouts
Models
Migrations
Form widget classes
Processing of request data
Validations
Registration/Login
Simple Active Record
Session Flash messages
Middlewares
Application events
Framework reusable/installable core
Support me by subscribing - bit.ly/2xTQOI0
=========================================================
-----------------AUDIO GEAR I HAVE-------------------
My Main Microphone - amzn.to/3eVCQ8v
Microphone Scissor Arm Stand - amzn.to/39mkGLQ
Microphone Shock Mount with Pop Filter - amzn.to/3jz7R5v
Audio Interface - amzn.to/30IoJhz
Microphone Pop Filter Mask Shield - amzn.to/3eXoQee
-----------------CHEAP AUDIO SETUP-----------------
Microphone + Shock mount + Scissor Arm - amzn.to/2D10Zxe
=========================================================
Follow me on social media:
/ thecodeholic
/ thecodeholic
/ thecodeholic
Check my Github:
github.com/the...

Пікірлер: 396
@TheCodeholic
@TheCodeholic Жыл бұрын
If you have the following error at 56:55 call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method app\controllers\SiteController::handleContact() cannot be called statically You have to make some changes in Router class. During the time of making this framework PHP version was allowing calling non-static method statically, but later it was changed. Here is fix... At 31:07 instead of calling call_user_func($callback) directly, we need to create an instance of the controller first. if (is_array($callback)) { $callback[0] = new $callback[0]; } return call_user_func($callback);
@TheCodeholic
@TheCodeholic Жыл бұрын
Does your controller have correct namespace? Try to put \ in front of app\controller\SiteController
@TheCodeholic
@TheCodeholic Жыл бұрын
@Đinh Như Khang I mean in index.php
@TheCodeholic
@TheCodeholic Жыл бұрын
You have something wrong in either index.php or in SiteController
@blessdarah1256
@blessdarah1256 Жыл бұрын
@Đinh Như Khang I also have this type of problem. The temporal solution was to make the function in the controller static. I'm stilling looking of a good fix to work without having to make all controller functions static.
@blessdarah1256
@blessdarah1256 Жыл бұрын
This solution works perfectly fine. Tested and it's working.
@tutanchacon
@tutanchacon Жыл бұрын
Three years later, it remains a great contribution to the community! Thanks for all
@mohammadaminsamadi9341
@mohammadaminsamadi9341 3 жыл бұрын
i think this is the best php tutorial for building MVC FRAMEWORK
@Gorbatsjov27
@Gorbatsjov27 3 жыл бұрын
Never worked with a (MVC) framework in my life and your explaination is super clear and easy to comprehend. You have a gift to do this. Keep doing this please.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Huge thanks man. APPRECIATE
@m3awna
@m3awna 3 жыл бұрын
how long have you been a developer?
@Gorbatsjov27
@Gorbatsjov27 3 жыл бұрын
@@m3awna I'm not a developer. At least not professional. In my spare time I'd like to program. And I did that on and off for the last 20 odd years. Mostly HTML and CSS, a bit of PHP and even less JS.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
@@m3awna I started coding 10 years ago and it's almost 9 years I work as a developer.
@m3awna
@m3awna 3 жыл бұрын
@@TheCodeholic we entered this field around the same time, but you're doing a lot better than me :) thanks for the tuts
@HondoUS
@HondoUS 2 жыл бұрын
Just finished Part 1. I really learned quite a bit. Some constructive feedback: - Maybe breaking the video down into shorter parts. There were a few points where I felt the video could have ended and a new one started. - For those not using PHPStorm, maybe clarifying when PHPStorm automagically adds something. - Maybe a little less jumping around; can be confusing for novices. Great job and extremely thorough explanation! Thank you!
@stms999
@stms999 3 жыл бұрын
I am a beginner so I can't judge others' code but I know clean code when I look at one. Readable, organized and it's only the first video. Fantastic work!!
@azatnurzhanuly7290
@azatnurzhanuly7290 4 жыл бұрын
Thank you, I did not even need to increase the playback speed because the narration is on point!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanjs buddy
@LEXUANPHAT
@LEXUANPHAT Жыл бұрын
Hello, I'm Vietnamese, I've watched your video and I see your video is very good, there's a lot of PHP stuff that I don't know yet.
@amirulfitri3751
@amirulfitri3751 4 жыл бұрын
Y u didn't have more viewssss! Just discovered your channel and immediately subscribed. Please continue the hard work, you're amazing.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy
@Akosiyawin
@Akosiyawin 4 жыл бұрын
Holy macaroni, I also created my own framework which is similar to your routing approach, But this is entirely more creative and object oriented, I might as well try this and re write my code. Thanks for this, God Bless you!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy
@neutralengineer3873
@neutralengineer3873 2 жыл бұрын
Hats off ❤️❤️❤️ Love from 🇮🇳 India.
@ilya_123__
@ilya_123__ 7 ай бұрын
Thank you a lot!. After 3 times i watched and workout this lesson i begin to understand! Lets go ahead! Your lessons is great!
@terrymurray2076
@terrymurray2076 4 жыл бұрын
Excellent Job! You mentioned that this framework is for educational purposes only. I was wondering what has to be done to make it suitable for production.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
It needs to be tested, bug fixed and improved for next several months only after that I would say it would be ready for production
@_zetrax
@_zetrax 3 жыл бұрын
@@TheCodeholic Can you make a video on how to test and bug fix software for production development. BTW, nice video.
@mrtayyabmughal7209
@mrtayyabmughal7209 4 жыл бұрын
Excellent, thanks, please make lectures on Laravel framework, if you have time 👍
@moazamali2434
@moazamali2434 4 жыл бұрын
Ya i am too looking forward for that
@arturobatista8015
@arturobatista8015 2 жыл бұрын
i am not an english speaker but i learned so much with this video, thanks :D.
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Glad to hear that!
@jakubgadzala7474
@jakubgadzala7474 2 жыл бұрын
Thank you for your hard work sir! This could definetely be a paid course. One more time, hats off to you sir, and a million thanks.
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Thanks buddy. It means a lot for me.
@jakubgadzala7474
@jakubgadzala7474 2 жыл бұрын
@@TheCodeholic I have finished your course on Traversy Media, and now started this one. It helps a lot. Never seen anybody iterating over one subject like you do. It's simply amazing. I would love to become your acolyte and work for you on daily basis
@neilacero6761
@neilacero6761 4 жыл бұрын
I knew that accent sounded familiar, and then the surname appears! Great tutorial. Madloba!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy. Shenc madloba 😉
@lanreoreyomi9555
@lanreoreyomi9555 4 жыл бұрын
This is crazy amazing. I never knew PHP was this cool. Thank you. Thank youuuuuuuuuuuuuuu
@TheCodeholic
@TheCodeholic 4 жыл бұрын
You're very welcome! PHP is very cool language.
@lanreoreyomi9555
@lanreoreyomi9555 4 жыл бұрын
@@TheCodeholic Thank you. Do you offer mentorship? That's one thing I am missing in my career development
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Do you mean one to one teaching?
@lanreoreyomi9555
@lanreoreyomi9555 4 жыл бұрын
@@TheCodeholic not really. It's someone you reach out to for some career advice. Share development process and also, help you become a better developer.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
I do this for junior developers in my company. And I plan to express this on my youtube channel.
@PeterMumford
@PeterMumford Жыл бұрын
This lesson was outstanding. It is the single best example of how to implement OOP in PHP that I've seen.
@TheCodeholic
@TheCodeholic Жыл бұрын
I am super happy to hear that. Thank you.
@sevdinkojic6212
@sevdinkojic6212 4 жыл бұрын
Very good approach with the evolution step by step ans very well explained, you did a great job congratulation and i hope that you have the courage to continue like this because it's lot of work. Thank you for sharing your knowledge with the community, i follow and and gonna share your channel !!!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Huge thanks Sevdin. Such comments are what I am doing all this for. The more such comments I see the bigger will be my motivation.
@saadnasim3032
@saadnasim3032 7 ай бұрын
you deserve a subscribe ... Thankyou for this amazing tutorial
@dungaland
@dungaland 4 жыл бұрын
Lots of thanks. Is something i have been looking for for years
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Welcome buddy
@mouhamaddiop1144
@mouhamaddiop1144 4 жыл бұрын
The way you code is very nice and understandable. Thanks a lot
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks a lot buddy.
@kadirookirim3231
@kadirookirim3231 3 жыл бұрын
thank you, i think this is the best php tutorial for building MVC FRAMEWORK
@홍성남-m3q
@홍성남-m3q 4 жыл бұрын
You are really a genius. I want to give you thumbs-up as many as I can.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thank you buddy. However I am not a genious at all. I am just very hard working person and this framework show also this. I did it 3 times to finally create video on it. But thanks once again... Appreciate your feedback...
@fatihkara6411
@fatihkara6411 2 жыл бұрын
thank you very much from Turkey
@TheCodeholic
@TheCodeholic 2 жыл бұрын
You are welcome from Georgia.
@alisidali580
@alisidali580 3 жыл бұрын
First of all i want to thank you for this great tutorials, there is one question about call_user_func function because does not accept non static method as second parameter if first parameter is not an instance, and thank you again.
@rashadmammadov8201
@rashadmammadov8201 9 ай бұрын
it is a gold material thanks for sharing it on youtube for free you are great man
@arnavchandra
@arnavchandra 4 жыл бұрын
You have a gifted voice... The way you explained is superb... It's a lot of work a bigg salute to the hard work you have put in. Just one question or point, the ones using Xampp or Wamp will not get the same errors as php built-in server?
@arnavchandra
@arnavchandra 4 жыл бұрын
In addition it would be great to install sentinel native or having sentinel native installed in any MVC other than Laravel ... in case just an idea... u can carry forward this same MVC integrating it with Twig and Sentinel it would be awesome... We can have Twig in one part and Sentinel in another ...
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy. Yes they will have the same output on xampp installation.
@arnavchandra
@arnavchandra 4 жыл бұрын
Apologies by output I mean errors ... Corrected in my comment 😊. There are a few, I would say smart logics you used here ... I tried the codes but Xampp was showing 404 without configuring it .. I am using php 7.4.9 ver Xampp
@bicancezar-catalin3402
@bicancezar-catalin3402 3 жыл бұрын
It's amazing the way you explain, thank you for this tutorials and for the time spent in creating this piece of art.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Huge thanks
@rajeshbudhathoki7888
@rajeshbudhathoki7888 4 жыл бұрын
Wow!😍😍 Thank you millions for making the series! 🙏🙏
@TheCodeholic
@TheCodeholic 4 жыл бұрын
You're so welcome!
@romanliapkin5174
@romanliapkin5174 3 жыл бұрын
Hey, Zura, this project is awesome! You have done a great job. But one thing I would like to the project. Would be cool if the video was splitting into chunks which may observe on GitHub. Now if go on GitHub you see the eventual result. Excuse me for my insolence. THANK YOU for worry about a beginers. А project like this so few on the internet.
@romanliapkin5174
@romanliapkin5174 3 жыл бұрын
Hmmm, I'm downloaded your project and by switching among commit of the project I found a point that I want to see in the video. Would be good if you add the timing of the video into the commits on GitHub.
@Lucas-hh4oh
@Lucas-hh4oh 3 жыл бұрын
Hey, thanks for the tutorials! Its really give me deep insight on how most of the framework actually work!
@mehdielfatihi9459
@mehdielfatihi9459 4 жыл бұрын
thank you very much , building an MVC framework is an awesome way to help people understand how real Frameworks like laravel works under the hood , keep going bro I just start learning backend development .
@ИгрокИграющийИгры
@ИгрокИграющийИгры 3 жыл бұрын
Very, very nicely done tutorial. Great material. Thanks. Only one thing: You are running toooo fast, way to fast. Its hard to follow if, I am making this project while watching. Really hard to stay on same page. While pausing video every 10seconds is an option, its little hard to keep in mind what and why I was doing 1min ago, so I got to rewind back, making me go through same material again and again. Just slow down a little. Would be amazing. Probably just, me, but still. Thanks for amazing content. Best one I found so far. :) Keep it up.
@TomiBorchert
@TomiBorchert Жыл бұрын
this problem is very common amongst tubers. videos are designed for native english speakers.
@TomiBorchert
@TomiBorchert Жыл бұрын
when learning, speed should not be priority.
@ИгрокИграющийИгры
@ИгрокИграющийИгры Жыл бұрын
@@TomiBorchert yes. I Agree posted comment 1 year ago. Still following channel. Really useful information here. Thank you. :)
@HustlemanHustlonian
@HustlemanHustlonian 10 ай бұрын
Just play it at half speed in the KZbin settings
@twentxx
@twentxx 2 жыл бұрын
Thank You very much! It's very helpful ☀️👍 Also I have a one question. Why we need a function setLayout in Controller if we can use variable $layout for function of Router - layoutContent?
@TheSaurus1233
@TheSaurus1233 4 жыл бұрын
Thanks a lot for the tutorial! I'm learning a lot. I had one question, how do I add those comments at the top when generating the classes? Thank you.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
You need to open phpstorm settings, find file templatea there and change it.
@jasongoossens
@jasongoossens 4 жыл бұрын
Awesome course! Your code is clear, and practically explains itself! It kinda looks like you're implementing the Node & Express way in PHP?
@kofestotech
@kofestotech 3 жыл бұрын
I guess slim PHP framework implemented something like that
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Thanks
@yves2522
@yves2522 2 жыл бұрын
Your're a great developer and...a very good teacher. Thanks a lot for sharing so much knowledge! It saved me weeks of reading and testing ;-)
@rafaelrosas59
@rafaelrosas59 4 жыл бұрын
Thank you so much for this content, the way you explain is very understandable
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks a lot
@kirilliz
@kirilliz 4 жыл бұрын
Great video! Thanks for sharing 🙂 is it common practice to do something like Application->$app? Seems a bit.. circular?
@dmxd
@dmxd 3 жыл бұрын
Router is pronounced "rauter", or "ruter", but not "roter". Excellent tutorial. Thank you.
@dmxd
@dmxd 3 жыл бұрын
"instead" is pronounced "insted", not "instid".
@davidtaiwo1848
@davidtaiwo1848 10 ай бұрын
great job, i find it easy to do whatever i want with this framework. I have issues identifying if the framework used is laravel or yii2 or any other. I am new to programming and i will appreciate you to clarify this for me. Thanks
@TheCodeholic
@TheCodeholic 10 ай бұрын
It is not Laravel or yii2. It is new framework created to help you understand how frameworks work.
@An-Nur_Info-Tech
@An-Nur_Info-Tech 2 жыл бұрын
I got to know you through freecodecamp on a course posted PHP MVC Framework, the course was so great and here I am on your channel and everything you've been posting was great and easy to learn. Thank you for the great work you've been putting into this. I tried integrating bootstrap with composer require tubs/bootstrap instead of the CDN linking, after everything was downloaded into the vendor folder I linked it in the layout folder main.php but it's not working out. Any help on this, please?
@renrevz8140
@renrevz8140 2 жыл бұрын
It was never too late to learn again Thank you so much for the absolute tutorial you have been making❤️❤️ keep up the good work
@TheCodeholic
@TheCodeholic 2 жыл бұрын
You are so welcome!
@alikaram98
@alikaram98 10 ай бұрын
wow so good thank's a lot bro
@PROTOTURKCOM
@PROTOTURKCOM 3 жыл бұрын
1:01:30 why you didn't use extract() instead of $$? Is there any cons?
@TheCodeholic
@TheCodeholic 3 жыл бұрын
I think $$ is easier to use. I do not know TBH if there is any cons.
@PROTOTURKCOM
@PROTOTURKCOM 3 жыл бұрын
Than I believe this code is extract($params) easier than this :D foreach($params as $key => $value){ $$key = $value; } don't you think so?
@TheCodeholic
@TheCodeholic 3 жыл бұрын
I think you are right. Just I have not used that before.
@PROTOTURKCOM
@PROTOTURKCOM 3 жыл бұрын
​@@TheCodeholic you taught me something, I taught you something :) thanks for exchange.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Thanks.
@ebedkharistian1472
@ebedkharistian1472 3 жыл бұрын
Glad I found this 👍👍👍
@mohammadtaheri98
@mohammadtaheri98 4 жыл бұрын
good job man, everything in order. very clear and perfect
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy
@nurharizulaimanmatharith4023
@nurharizulaimanmatharith4023 4 жыл бұрын
The most greatest work....thanks bro your knowledge is awesome
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thank you
@simplydevelopments3736
@simplydevelopments3736 3 жыл бұрын
Great Tutorial. On 1.01 why not use extract($params)
@freshgold09
@freshgold09 Жыл бұрын
Thanks for posting this awesome video which is really help me. But I wonder how to replace if there are 2 or more placeholders in views?
@coderboysobuj
@coderboysobuj 4 жыл бұрын
It’s really great tutorial. Go ahead sir..❤❤
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy
@kmlclktrk
@kmlclktrk 10 ай бұрын
Veri great tutorial🎉❤ thanks a kot
@kmlclktrk
@kmlclktrk 10 ай бұрын
İf possible could you tell me what is your choice? Laravell or your mvc routing?
@ruhollahh01
@ruhollahh01 4 жыл бұрын
Thank you for this great tutorial.
@Krlos5605
@Krlos5605 4 жыл бұрын
I loved the video, but why do you recommend not using the code on a production website?
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Because the framework is created in several hours and it is not stable. There will be bugs...
@fajar312
@fajar312 4 жыл бұрын
thank you, very helpful and very neat and structured like a laravel router
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy
@fajar312
@fajar312 4 жыл бұрын
@@TheCodeholic You are welcome, friend
@firstignitor
@firstignitor 2 жыл бұрын
hello sir.. thank you so much for all that knowledge and I would really like to thank you. Sir.. is it possible to relate that routing system to any design pattern like the front-controller pattern or pipe and filter or may be chain of responsibility? is that routing idea related to any design pattern such that it can be documented or reverted in any way to any other design pattern? thanks in advance if you regard my question. thanks
@dccastro2182
@dccastro2182 4 жыл бұрын
Porra !! Eu esperei por este conteúdo há muito tempo, e agora chegou na minha cara!!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Excellent!!! Hope it will teach you something.
@ferip7
@ferip7 4 жыл бұрын
Thank You, your explanation was very understandable
@habibulislam152
@habibulislam152 3 жыл бұрын
everything is going over my head. I have completed php basics and know php oop systext. Could you please tell me what should I start now?
@shaikhanuman8012
@shaikhanuman8012 4 жыл бұрын
Thank you very much sir 👍😊😊😊😊😊😊😊😊😊😊😊😊😊😊 very informative this is type of teaching we are expecting. In one hour we are doing coding very interesting and exciting thanks for providing great lectures.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thank you Shaik, Glad to read such comments...
@shaikhanuman8012
@shaikhanuman8012 4 жыл бұрын
@@TheCodeholic I am prodly say your my teacher.
@ShamsuddeenAbdulkadir
@ShamsuddeenAbdulkadir 3 жыл бұрын
Hello The codeholic, this is a very awesome tutorial and thanks very much for it. I just discovered your channel yesterday and quickly made the decision to take this particular framework tutorial, and i have learned a lot of new things already. I have reached 43:08 mins on this video but my browser doesn't show any content at that point. I am running php 7.4.21 and apache on ubuntu 20.04. any hint on what might be causing it would really help. Thanks one more time.
@jadidlar4765
@jadidlar4765 3 жыл бұрын
use echo instead of return. Return is not showing messages on me
@Korzk
@Korzk 2 жыл бұрын
I know its late but try to put echo before $this->router->resolve in Application.php
@moussaouimehdi734
@moussaouimehdi734 3 жыл бұрын
great tutoriel it helps me a lot and took me one day to understand and test all things. I found just one error and i know it will be mentionned in the next videos. In the last video the _404 page not found dosen't work because in the layoutContent method we try to access to the propriety controller of the Application and it's not initialized ($callback null).
@alighazal3978
@alighazal3978 3 жыл бұрын
thank you so much .. it is an awesome series
@ashifahamed9916
@ashifahamed9916 Жыл бұрын
its really grate, So much helpful.
@HeshamShawky1
@HeshamShawky1 2 жыл бұрын
First of all .. thank you for this great tutorial it was very useful second thing in 56:40 there's an issue in calling 'handle contact' method in the site controller class ... i think the method is been called in a class context while the method hasn't been declared as static . hope to correct me if i'm wrong . thank you :)
@ThePancakeJedi
@ThePancakeJedi 2 жыл бұрын
Yes. How to fix this? I got stuck here.
@deZOO77
@deZOO77 2 жыл бұрын
@@ThePancakeJedi yo can add static keyword in method declaration
@thevipinchand4690
@thevipinchand4690 2 жыл бұрын
@@ThePancakeJedi You can do this $app->router->post('/contact', [(new SiteController), 'handleContact']);
@asadbekdeveloper4599
@asadbekdeveloper4599 2 жыл бұрын
hello Zura , thank you so much for this lessons. Can you help me about output buffering ? I can't understand it how works
@rudotel112
@rudotel112 3 жыл бұрын
It is correct if we renderView from the Response class?
@spencer5028
@spencer5028 2 жыл бұрын
Recommend modeling this with UML so the viewers can get a basic understanding of the structure and flow of requests through the app/
@АнтонВогусов
@АнтонВогусов 2 жыл бұрын
Hi everybody! May I ask you a question? On 56:08 when you pass an array with classname and non-static function to 'call_user_func()', how does it work with a class but not an object of this class in passed array? If class is passed it should call method statically, but it is non-static method 'contact' (or 'handleContact')? Thank you))
@user-cl6zn6sc2k
@user-cl6zn6sc2k 2 жыл бұрын
yes i have the same question, I don't get why can he call it as static method when is not
@ΓιώργοςΜουχταρίδης
@ΓιώργοςΜουχταρίδης 2 жыл бұрын
@@user-cl6zn6sc2k Same question here
@zaakhirpouzi283
@zaakhirpouzi283 2 жыл бұрын
For php8 may refer here php.watch/versions/8.0/non-static-static-call-fatal-error
@tarikgadoumi1297
@tarikgadoumi1297 2 жыл бұрын
ofc i subscribe to you budy ! i like the way you explain keep up hero !!!!!
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Thanks a lot
@mahyarbehzadi738
@mahyarbehzadi738 3 жыл бұрын
thanks for this great course 👌👌🔥
@angelabad8294
@angelabad8294 2 жыл бұрын
amazing video man.
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Thanks
@the.mikeyy
@the.mikeyy 3 жыл бұрын
01:00:54 you can also use PHP's 'extract' function, it basically does the same thing but it is cleaner.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Thanks.
@tesszheng4586
@tesszheng4586 2 жыл бұрын
awesome, extract() function is a handy one, thanks, I learnt a new function
@aidanayala8549
@aidanayala8549 2 жыл бұрын
using extract is recommended against when dealing with data that could come from an untrusted source
@TahirBhai
@TahirBhai 3 жыл бұрын
Amazing tutorial, you just got new subscriber today.
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Thanks and welcome
@terrymurray2076
@terrymurray2076 3 жыл бұрын
Hi. When using the handleContact method from the SiteController class I get the warning that handleContact should be called statically. Can you help me with this? When I make the method static the warning goes away.
@grupoprosperidade2383
@grupoprosperidade2383 3 жыл бұрын
Very useful! Thank you.
@Ananaskirsche12
@Ananaskirsche12 3 жыл бұрын
Very nice video! One improvement would be to put the timestamps in the description, so one can rewatch one aspect :)
@TheCodeholic
@TheCodeholic 3 жыл бұрын
You are right.
@ninononikashvili2945
@ninononikashvili2945 11 ай бұрын
Hi and many thanks to you. I got a question regarding comments. which plugin do you use to generate comments automatically? ant the comments follow psr standards am I right?
@dfordemo981
@dfordemo981 3 жыл бұрын
Amazing course, I am learning a lot of thins from your videos ____
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Thanks a lot
@viggolagerstedtekholm4166
@viggolagerstedtekholm4166 3 жыл бұрын
You are amazing dude, solid stuff.
@sviatstupak2162
@sviatstupak2162 Жыл бұрын
Well done!
@mustafaagha8834
@mustafaagha8834 3 жыл бұрын
Amazing tutorial
@kuhaniresti
@kuhaniresti Жыл бұрын
the problem with exiting framework is they are not based on domain driven design, one example of concerns is, they load view classes and other dependencies related to text/html for application/json requests. they executes a lot of defaults that not going to be needed for outputting the reply. imagine having access to title for json request.
@programmingtestsandproje
@programmingtestsandproje 3 жыл бұрын
thank you so much
@iaskakho5646
@iaskakho5646 2 жыл бұрын
Great video, one question why no view class?
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Maybe in a second version of the framework.
@iaskakho5646
@iaskakho5646 2 жыл бұрын
@@TheCodeholic you cover the view later when swapping the Router class for an instance. Very good stuff, I switched all my servers to 7.4 cuz of your vids :) Keep it up!
@sqdtnz
@sqdtnz 2 жыл бұрын
It's been so long ago since I worked with PHP, I vaguely remember I did this routing with a .htaccess file, but either I was doing it wrong back then, or a better way has arrived?
@AbdulMannan-jz7zm
@AbdulMannan-jz7zm 3 жыл бұрын
1) are you using a template for dump or something in phpstorm? 2) Could you elaborate a bit as to how ROOT_DIR or for that matter the whole APPLICATION object is available in other classes like router? 3) Also when there is an error I don't see it in the browser just get a blank screen. But I am able to see the error in the terminal in PHP storm I am using PHP 7.4.3 on ubuntu.
@edwardelrics2138
@edwardelrics2138 Жыл бұрын
echo instead of return
@mladentrickovic744
@mladentrickovic744 4 жыл бұрын
Keep it going buddy u helped a lot.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks you friend
@mahmoudasmaail3549
@mahmoudasmaail3549 2 жыл бұрын
عمل جبار
@rjaysharma
@rjaysharma 4 жыл бұрын
WoW😘😘, Loved it..👍👍
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks a lot 😊
@topalek
@topalek 4 жыл бұрын
сразу лайк, неглядя ))
@josechirino5168
@josechirino5168 4 жыл бұрын
This is amazing, thank you
@thecodeluminary
@thecodeluminary 3 жыл бұрын
Can you do for JavaScript too. Too many JS Frameworks out there. I don't understand the internals. By the way, this tutorial is fire. Learnt a lot. I was only used to Singleton Design Pattern
@TheCodeholic
@TheCodeholic 3 жыл бұрын
Great suggestion! I will try
@thecodeluminary
@thecodeluminary 3 жыл бұрын
@@TheCodeholic Please how do one host this on a shared hosting (cPanel) - I'm having issues setting it up to test on a development server; Thanks
@swooshkid9593
@swooshkid9593 4 жыл бұрын
Very informative video. I dont like your code practice at some cuts tho. Also I think it would be better if you would create a branch for every video instead for a project since your current link is for this project too updated, which is why it becomes automatically useless.
@fleckenfurz77
@fleckenfurz77 Жыл бұрын
Hi Zura! Thank you so much for the tutorial and for the immense effort behind it! But.. I'm kinda stuck at 56:55min...and i am very confused! How is it that you can call handleContact without the SiteController being instantiated??? Because for me an error is thrown consequently: "Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method app\controllers\SiteController::handleContact() cannot be called statically in... (stack trace)...C:\Users\User\Desktop\Code2022\Custom_MVC_Framework\core\Router.php on line 67"
@TheCodeholic
@TheCodeholic Жыл бұрын
Thank you. I created pinned comment on the video, which explains the problem and what should be done to fix it.
@safara_umarov
@safara_umarov 4 жыл бұрын
❤❤❤❤❤ thank you a lot))
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Welcome
@hammadhassanhashmi
@hammadhassanhashmi 3 жыл бұрын
Did you create .htaccess? Because index.php is not serve when I typed /users it is showing page not found
@jjmontgo2
@jjmontgo2 3 жыл бұрын
He is using the built-in php web server. .htaccess is for Apache.
@izuuarchmike7291
@izuuarchmike7291 2 жыл бұрын
Hello Sir. You missed something about the routes. You didn't check for dynamic routes. Something like /user/{Id} just like the way it's done in laravel. How can I be able to go about it using regular expression
@TheCodeholic
@TheCodeholic 2 жыл бұрын
I added that later to this framework. kzbin.info/www/bejne/nWqqh2B7qdyNf68
Models, Forms, Validation - Part 2 | PHP MVC Framework from Scratch
51:50
Is this the best PHP Routing library?
16:17
Coders Page
Рет қаралды 19 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 48 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 4,2 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,8 МЛН
PHP MVC Pattern - View Parameters Exploit - Full PHP 8 Tutorial
22:17
Program With Gio
Рет қаралды 40 М.
When to use Traits, Interfaces, and Abstract Classes in PHP
15:08
Andrew Schmelyun
Рет қаралды 21 М.
PHP For Beginners, Ep 33 - Build a Better PHP Router
20:46
Laracasts
Рет қаралды 22 М.
CodeIgniter 4 and PHP MVC basics: controllers, views and layouts
24:50
Dave Hollingworth
Рет қаралды 39 М.
PHP For Beginners, Ep 15 - Make a PHP Router
18:03
Laracasts
Рет қаралды 58 М.
I built 10 web apps... with 10 different languages
14:23
Fireship
Рет қаралды 1,6 МЛН
Kubernetes Crash Course for Absolute Beginners [NEW]
1:12:04
TechWorld with Nana
Рет қаралды 2,8 МЛН
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 48 МЛН