Use PHP to Create an MVC Framework - Full Course

  Рет қаралды 261,775

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Пікірлер
@mferino1960
@mferino1960 3 жыл бұрын
If people are having issues around 1:03:00 he solves the problem right around 1:10:40 so don't lose hope! Thanks for the great video, I'm learning a lot!!
@johnnyw.s.2372
@johnnyw.s.2372 3 жыл бұрын
Thank you... I'm trying to figure out what is being done in this part and going to give up until see you comment...
@gutofguts
@gutofguts Жыл бұрын
What a CHAD
@ThiagoAlves-if3rl
@ThiagoAlves-if3rl 2 жыл бұрын
I'm Brazillian and even I not speaking english very well, your explanation was the best that I have seen. And all I have to say is thank you for sharing this for free, you are awesome.
@chinonsoikewelugo5486
@chinonsoikewelugo5486 2 жыл бұрын
I can't thank you enough for this. Went through the whole 6 hours and now I have my own functional PHP framework, and was able to learn a lot of new concepts I had previously overlooked. This is handsdown the best tutrorial I've come across!
@TheCodeholic
@TheCodeholic 2 жыл бұрын
Thanks a lot
@francisokoroafor2023
@francisokoroafor2023 Жыл бұрын
how fa
@howuseehim
@howuseehim Жыл бұрын
He said don't use it
@ThaiBinh-A
@ThaiBinh-A 7 ай бұрын
I am Vietnamese and I have been researching MVC for my first project. This information is exactly what I needed. Thank you very much.
@alexandergarcia-yo6kw
@alexandergarcia-yo6kw 3 жыл бұрын
i'm new in php, i just made mike's tutorial, now i'm at 2 hour of this tutorial, it is awesome what i has been learn with this, it take me 3 days to watch this 2 hours but it's totally worth
@MatiasAE_17
@MatiasAE_17 9 ай бұрын
I watched until the 17th minute, but what can I say? Just wanted to say thank you!!!!!. It really encourages viewers to read and investigate more about the topics. Again, thank you!
@lolgamer4265
@lolgamer4265 2 жыл бұрын
At 2:52:42 if you can't instantiate migration class...this should work in PHP 8.1: className = pathinfo($migration, PATHINFO_FILENAME); $class = "app\migrations\\" . $className; $instance = new $class; echo "Applying migration $migration ..." . PHP_EOL; $instance->up(); echo "Applied migration $migration" . PHP_EOL; //Basiclly we have to append the namespace to the classname so when we create object, the object knows from which namespace should be created.
@learntoswim512
@learntoswim512 Жыл бұрын
I have having issues with this exact problem. I tried you solution but get told, "Cannot declare class m0001_initial, because the name is already in use". Any suggestions?
@rezwanhossainsajeeb64
@rezwanhossainsajeeb64 4 жыл бұрын
I'm from Bangladesh. I am a native of Bengali. That's why I'm not well at English. But I enjoy this tutorial... A lot of love for You.
@monsurrahmanriaz5157
@monsurrahmanriaz5157 3 жыл бұрын
bro, I'm from bd. ai course kemon? ami suru korte casci.
@waynekille4914
@waynekille4914 4 жыл бұрын
This is superb. Fast paced & does exactly what it says on the tin. Thank you very much for creating and sharing this for free, it is absolutely invaluable and you are very generous!
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy. Appreciate your comment.
@AmitDas-yb3re
@AmitDas-yb3re 4 жыл бұрын
It is such an awesome series, you will learn many things on the way. This series will start your intermediate phase from beginners. The code quality is awesome. From last year I did a couple of MVC frameworks but none is comparable to this series. I am eagerly waiting for the Laravel series with an e-commerce project. Make it a paid course I will happily buy.
@birukindrias4308
@birukindrias4308 3 жыл бұрын
can any one help me please with the migration Class 'm0001_initial' not found in C:\Users\hp\Desktop\mvx\core\Database.php:33
@nemac23
@nemac23 2 жыл бұрын
@2:08:00 Another option is to use heredoc instead of sprintf. I think it's easier and more legible. That goes for the sql statements using backticks too. $label = $this->model->labels()[$this->attribute] ?? $this->attribute; $error = $this->model->getFirstError($this->attribute); $input = $this->renderInput(); return
@alexanderkucheryuk4722
@alexanderkucheryuk4722 4 жыл бұрын
This is excellent! Programming is a hands-on experience. By building your own mini MVC framework you get to grasp how larger frameworks (e.g. Symfony or Laravel) work.
@vusimdudu9033
@vusimdudu9033 3 жыл бұрын
This is the best tutorial I have watched on MVC, as well as being excellent on allowing me to understand how frameworks work.Well done.
@smhaseeb
@smhaseeb 4 жыл бұрын
I just learned python and now i want to become an expert. This channel helped alot.
@swooshkid9593
@swooshkid9593 4 жыл бұрын
this is php bro
@smhaseeb
@smhaseeb 4 жыл бұрын
@@swooshkid9593 I said channel, not video
@PankajSingh-hz2gr
@PankajSingh-hz2gr 4 жыл бұрын
@@smhaseeb 😂
@danuzonez
@danuzonez Жыл бұрын
Best PHP Framework tutorial. Want more videos like this.
@yulianloaiza
@yulianloaiza Ай бұрын
What a great tutorial! Thanks for the detailed explanations of why you do what you do. I will most definitely check your channel and the content you create!
@fajar312
@fajar312 3 жыл бұрын
Thank you for making it in one complete video, warm greetings from Indonesian developers
@thestorytimecrew
@thestorytimecrew 9 ай бұрын
I am very happy too see dear zura .... and u teach new leasson and new journy.... also the best work you and freecodecamp organization.... keep it up this is the best work for all students and other developer .... whaterver people think but my thinking is ..zura and freecodecamp given jobs and gets blessings of people
@BillClinton228
@BillClinton228 4 жыл бұрын
Fantastic course... thank you so much for putting this on youtube.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thank you too
@gametroll6311
@gametroll6311 2 жыл бұрын
I so appreciate you for this. I've always wanted to learn what it takes to create these frameworks. Your lesson here is hands down the best I've seen. Very informative, very thorough, I love that you even go to great lengths to explain every detail from the what and the why to the how it is done. I can't thank you enough. Perhaps some day, if you haven't already done it, you'll do one of these videos on creating a javascript framework like React, Vue, and Angular?!?!
@minguinmyoui7786
@minguinmyoui7786 4 жыл бұрын
this is what i'm waiting for ~Thanks
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Glad to hear that
@rakinar2
@rakinar2 2 жыл бұрын
By watching this video course, I built my own MVC framework, 'Invention Framework'. Thank you Zura; loved this course.
@ilya_123__
@ilya_123__ 10 ай бұрын
thank you Zura!!! it is difficult for me, but i keep trying to understand. sorry for my bad English. you work is great!
@BucurIonNiculae
@BucurIonNiculae 4 жыл бұрын
Thanks for this video tutorial, greetings from Romania.
@TheCodeholic
@TheCodeholic 4 жыл бұрын
It's my pleasure
@nilambarsharma4869
@nilambarsharma4869 8 ай бұрын
Nice tutorial.
@phucthaifg
@phucthaifg 3 жыл бұрын
omg, you are so talented! Thanks for the sharing!
@alexandergarcia-yo6kw
@alexandergarcia-yo6kw 3 жыл бұрын
Solution to " Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method app\controllers\SiteController::contact() cannot be called statically" error during the implementation of the controller hello, i'm using php 8.x, i solved this problem making static every function in SiteController (where i had to use SiteController), based on the documentation in the version 8.x the operator :: is used for static functions, i also had to use use app\core\Application in the SiteController to include Application in SiteController. I write down this here just in the case other one had the same problem. (sorry for my english, I'm not a native speaker)
@RebrandSoon0000
@RebrandSoon0000 3 жыл бұрын
Thanks! Ran into this issue and now you solved it, thank you.
@jaimeponce2968
@jaimeponce2968 3 жыл бұрын
This is another solution: If a SiteController instance is passed then run public method normally. $app->router->post("/contact", [new SiteController, 'handleContact']); posdata: I'm not a native speaker either xd.
@komellar97
@komellar97 3 жыл бұрын
Thanks for the solution of the problem
@efqanmesediyev5979
@efqanmesediyev5979 3 жыл бұрын
Thanks you
@VincenzoCorvaglia
@VincenzoCorvaglia 2 жыл бұрын
Very useful information. Tank you.
@mcg6429
@mcg6429 Жыл бұрын
Thanks for the video, this is the best tutorial of PHP
@swooshkid9593
@swooshkid9593 3 жыл бұрын
1:57:44 this wouldnt work in php 8 with strict types on since str_replace expects a string|array and not an integer at the second parameter. An easy Fix would be to cast the value into a string with the php built in function strval()"
@benjaminspinola1788
@benjaminspinola1788 Жыл бұрын
nice curtains. But other than that: Awesome tutorial! :)
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
If you have this error: Deprecated: call_user_func() expects parameter 1 to be a valid callback, non-static method app\controllers\SiteController::handleContact() should not be called statically in /Applications/MAMP/htdocs/MVC/core/Router.php in 1:04:00 just add static to to handleContact() namespace app\controllers; class SiteController { static public function handleContact() { return "handle the contact"; } }
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
However, you cannot use $this inside static so in index.php should change into this $siteController = new SiteController(); $app->router->get('/',[$siteController,"home"]);
@leodesiatnykov4031
@leodesiatnykov4031 4 жыл бұрын
You are a star! Unbeatable skills+++++
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Huge thanks
@charlesthomas8611
@charlesthomas8611 9 ай бұрын
This man is purely professor in this language
@noxdralock6293
@noxdralock6293 4 жыл бұрын
Thanks a lot for this very good video ! I learned a lot during this course, I already worked with Symfony and it allowed me to have a better understanding behind those frameworks ! Keep up the good work 😉💪
@emadesavi8015
@emadesavi8015 9 ай бұрын
God bless you, this video is great, I learned a lot.❤🙏
@ნოდარდავითულიანი
@ნოდარდავითულიანი 2 жыл бұрын
Wow, didn't expect that. He is from Georgia, really underrated country 🇬🇪
@nikakhutsurauli4647
@nikakhutsurauli4647 3 жыл бұрын
Hello Zura! Glad to see you here too
@djolemc1
@djolemc1 4 жыл бұрын
At 1:08:50, why don't you use extract($params) instead of foreach(...) ?
@nielsvansteen9087
@nielsvansteen9087 3 жыл бұрын
Although a great tutorial for learning how to build a framework with PHP, there are some (in my opinion: major) concerns about your approach with OOP programming, like for example around 04:43:58 when you make a class 'BaseMiddelware.php' that class is abstract and only has 1 abstract method, so why don't use an interface? This was also no the first time, somewhere in the video you could also use an interface instead of a class. And secondly, almost all your properties are public, and yes I understand with PHP being a dynamically typed language it is easy, to store the variables in a string array and dynamically get/set the value like that, you could still make the properties private (or at least protected) and use 1 global setter/getter per class and pass the name of the property as an extra parameter and get or set the value like that. and last, although this might be subjective, your classes have very high coupling between them, which could probably also be improved. EDIT: I just want to say, even though I 'criticized' the OOP way, I still enjoyed this video, and would recommend it, I learned a lot. And tbh if you want to make a framework you should know enough about programming that you can improve the OOP aspects yourself if you want to.
@adipurnomo5683
@adipurnomo5683 3 жыл бұрын
So MVC method was found in 90's, isn't it?
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
how do you set up PHP to avoid "not found" at 8:52. I am using MAMP
@cptnstark3350
@cptnstark3350 3 жыл бұрын
The server needs to be configured to route all requests to the index.php. To do this create a file called ".htaccess" and use the Rewrite commands. The solution is outlined on stack overflow when you search for: redirect-all-to-index-php-using-htaccess
@joppieb9237
@joppieb9237 3 жыл бұрын
Hello thanks for the great tutorial about MVC. I have an error around 1:03:00 Fatal error: Uncaught Error: Class 'app\controllers\Application' not found in /Applications/MAMP/htdocs/framework/app/controllers/SiteController.php:15 Stack trace: #0 [internal function] are they more people with this error?
@Fmly-gyd04
@Fmly-gyd04 3 жыл бұрын
i have the same error
@nemac23
@nemac23 2 жыл бұрын
use app\core\Application
@muhammadasifch3926
@muhammadasifch3926 3 жыл бұрын
It is really amazing, useful and learnable video. Thanks dear.
@medazizyahyaoui6612
@medazizyahyaoui6612 2 жыл бұрын
Hello friends I need help with this issue "PHissuel error: Uncaught Error: Class 'm001_initial' not found " at 2:51:59 and thanks advance.
@lolgamer4265
@lolgamer4265 2 жыл бұрын
At 2:52:42 if you can't instantiate migration class...this should work in PHP 8.1: className = pathinfo($migration, PATHINFO_FILENAME); $class = "app\migrations\\" . $className; $instance = new $class; echo "Applying migration $migration ..." . PHP_EOL; $instance->up(); echo "Applied migration $migration" . PHP_EOL;
@medazizyahyaoui6612
@medazizyahyaoui6612 2 жыл бұрын
@@lolgamer4265 thanks dude it's work
@lolgamer4265
@lolgamer4265 2 жыл бұрын
@@medazizyahyaoui6612 Niceee..
@AndreSilva-gb2hj
@AndreSilva-gb2hj 3 жыл бұрын
Thanks for the awesome course!
@floringanea6944
@floringanea6944 3 жыл бұрын
Very good my friend! danke shanke!
@charbelabouyounes6683
@charbelabouyounes6683 3 жыл бұрын
Thank you so much for this tutorial it is really awesome. If possible could you answer this question? How did you learn all of this, is it over the years or is there some kind of documentation that you used. And how would you advise people when trying to improve their php knowledge
@randylhopkins3836
@randylhopkins3836 2 жыл бұрын
Howdy, really like your methods and php mvc framework. I'm stuck at 3:59 Login, everything have worked until the Login setup which error at DBModel line 40, Error: Non-static method app\models\User::tableName() cannot be called statically in /var/www/html/phpmvc-framework/core/DbModel.php on line 40.. Can't seam to fix this error. Any ideas? The line code is: $tableName = static::tableName(); Thank you!
@joel-rg8xm
@joel-rg8xm 2 жыл бұрын
Those methods have to be created as static, I figured it out by the GitHub code :)
@alexbayarov3072
@alexbayarov3072 2 жыл бұрын
2:00:01 - no navbar, 2:00:48 navbar appeared. Why?
@lashakajaia1079
@lashakajaia1079 3 жыл бұрын
მადლობა ზურა ! ❤️
@tigidou3344
@tigidou3344 3 жыл бұрын
Sanitize off front all request input is a bad idea when multi system access the DB. Because, you MUST sanitize exatly with the same process. Example : login with password. If you hash the password after sanitize, the hash maybe not be the same with an other sanitize process.
@KJ_Yuugen
@KJ_Yuugen 3 жыл бұрын
hi i got an error at 1:02:41 is does not pass the array is say "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"
@buhahemal4635
@buhahemal4635 3 жыл бұрын
pass the class object
@lawrencejohn1638
@lawrencejohn1638 3 жыл бұрын
follow on with the tutorial he solved it minutes later
@astrolillo
@astrolillo 2 жыл бұрын
You can make your functions static in the Controller class or instead of passing the class you create an instance like this: $app->router->get('/', [new SiteController(), 'home']);, this is assuming you are using PHP 8.1+
@rudinandrey
@rudinandrey 3 жыл бұрын
very well begin of tutorial, I will watch all this video, thanks a lot. I think it is very helpfull
@borisbar4148
@borisbar4148 2 жыл бұрын
I’m stuck at around 1:00:00: The renderView($view) function returns NULL for both var_dump($layoutContent) and var_dump($viewContent). I have a blank web page. Has this something to do with the ob_start() and ob_get_clean() functions? When I remove them I can see the layout and the page but without the {{content}} string being replaced. output_buffering is set to 4096. Please help.
@borisbar4148
@borisbar4148 2 жыл бұрын
I was able to get rid of the problem: What I missed was putting a return in front of each ob_get_clean() function. Now it works like a charm!
@ahmadzreqat2376
@ahmadzreqat2376 4 жыл бұрын
I like your framework is combines laravel and yii2 frameworks Greet job
@Arlasdarier
@Arlasdarier 3 жыл бұрын
thanx for the fantastic course!
@mahendranath2504
@mahendranath2504 4 жыл бұрын
A Big Thanks to you, and for your effort. I know working on core PHP is more helpful to understand things well, I appreciate your effort, this video will help us to understand or learn PHP a lot well, a happy subscriber, i subscribe to your channel as well thanks for amazing content
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks buddy.
@dAvid3_f
@dAvid3_f 3 жыл бұрын
Awesome tutorial, thumps up to the author !
@alexbayarov3072
@alexbayarov3072 2 жыл бұрын
Non-static method app\core\DbModel::findOne() should not be called statically and Non-static method app\models\User::tableName() should not be called statically 4:08:10
@emadtalaat
@emadtalaat 2 жыл бұрын
same here, and some work by changing the function to static and others does not
@emadtalaat
@emadtalaat 2 жыл бұрын
I just figure it out, change method to static and if gave an error that it can't be changed then the overridden abstract method too must be changed to be static in my case it was public static function primaryKey(): string inside User.php as well as abstract static public function primaryKey(): string; inside DbModel.php
@supersquat
@supersquat Жыл бұрын
@ 5:45:22 I'm getting an error: Root package '' cannot require itself in its composer.json Does someone know how to fix this?
@thecodeluminary
@thecodeluminary 3 жыл бұрын
Please can you do a tutorial on how to host this on cPanel: I'm having issues hosting it
@SuperDaroG
@SuperDaroG 3 жыл бұрын
1:08:33 - Wasn't it better to use an "extract" function rather than a foreach loop?
@TheLittleMaestro2911
@TheLittleMaestro2911 4 жыл бұрын
good luck for your channel...
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks
@Ab-cj6gl
@Ab-cj6gl 3 жыл бұрын
This guy is a legend
@technotv3227
@technotv3227 4 жыл бұрын
well its 12 in the night, and look what i am watching >
@TheCodeholic
@TheCodeholic 4 жыл бұрын
lol 😀
@heftig.7614
@heftig.7614 3 жыл бұрын
2 am here in germany now, guess what iam doing? xoxo
@rockybalboa5600
@rockybalboa5600 3 жыл бұрын
Video is nice. I reached at 1:30:00 where a separate layout for login and registration is created. But the Not found is not working over there it gives error. Please help
@nemac23
@nemac23 2 жыл бұрын
What error?
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
Hi, can anyone explain SiteController :: class in 1:03:07 ?? Thank you
@JACKoPL
@JACKoPL 4 жыл бұрын
Good job for learn. Few month searching of this. I know it's small, project and use to teaching. It's not laravel but better for db its use illuminate\database, I think. Routing better separating to other file/s. Maybe you say of this. My english is poor ;)
@emmanuelmnzava8966
@emmanuelmnzava8966 3 жыл бұрын
Really thank you for this.
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
wait a minute, where is your "contact" folder at 36:00???
@fajar312
@fajar312 3 жыл бұрын
When we define a route in the form of, we cannot access the '1' or 'slug' parameter other than using the $ _GET global. We send Request and Response classes as parameters to the controller. Likewise how can we send this '1' or 'slug' parameter ?
@Personal-M.I.S.
@Personal-M.I.S. 2 жыл бұрын
I know this is a bit old right now and though still a ton of good info, but what would be really cool is if you did another video using a TDD approach =)
@moatazrabeea6685
@moatazrabeea6685 2 жыл бұрын
return str_replace('{{content}}', $viewContent, $layoutContent); show nothing in the browser only when use echo (str_replace('{{content}}',$viewContent,$layoutContent)); the view is presented in the browser why?
@mohammadjabedhosen9680
@mohammadjabedhosen9680 3 жыл бұрын
Really awesome
@fatafatrecipe9447
@fatafatrecipe9447 4 жыл бұрын
You are amazing thank you 👍
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks a lot
@TigranKuchatyan
@TigranKuchatyan Жыл бұрын
Do we need really to initialize object Request in 2 places? I get same result only having initialized it in Router class.
@dawnpeace9122
@dawnpeace9122 4 жыл бұрын
simply amazing
@alvin_lal
@alvin_lal 3 жыл бұрын
thanks , very helpful !
@sauau9588
@sauau9588 2 жыл бұрын
sorry but, my error stuck in call_user_func(SiteController::class, 'contact') with static function cannot allow called ?? why use can call contact method while you do not have static function?
@DevsLikeUs
@DevsLikeUs 4 жыл бұрын
Love this !
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks
@michaelgrigoryan25__old
@michaelgrigoryan25__old 4 жыл бұрын
You should create a tutorial on how to create JS MVC framework. Would be really, really, really,really dope
@rimantasdanilevicius6754
@rimantasdanilevicius6754 4 жыл бұрын
let me know if you will find such tutorial :)
@0xDEAD_Inside
@0xDEAD_Inside 4 жыл бұрын
These might help: kzbin.info/www/bejne/jmHVooOch8t4nLc kzbin.info/www/bejne/a5fNk61mYteFaLc kzbin.info/www/bejne/aGWqd2iDi6p4oKc
@vainglories7512
@vainglories7512 3 жыл бұрын
No
@sumitmakwana5915
@sumitmakwana5915 3 жыл бұрын
hi there, can you make a separate video on how to make own custom ORM like Eloquent in laravel ?
@borisbar4148
@borisbar4148 2 жыл бұрын
What I don’t understand is why I’d need the renderView and renderViewOnly functions also inside the Router class. From the Controller class you could simply refer to the View class directly. Why the detour?
@Edi_LifeStyle
@Edi_LifeStyle 3 жыл бұрын
Thanks a lot for this very good video. What font and theme did you use in your text editor in this video?
@variouseducatoinaltube6423
@variouseducatoinaltube6423 4 жыл бұрын
That's awesome!
@tofudimsum8072
@tofudimsum8072 3 жыл бұрын
As you said, it is not production ready. But what constitute as "production-ready"?
@jeremymattausch2218
@jeremymattausch2218 10 ай бұрын
Hey guys. First of all, probably still one of the best PHP lessons I've seen so far. I just have a couple errors I can't seem to be able to fix. Would anybody be able to help me ? I just finished implementing the "Hide Login/Register buttons" and in the Application class, in the static function isGuest(), apparently the "user" must not be accessed before initialization. Would you be able to tell why that is ?
@raffimansoor3739
@raffimansoor3739 4 жыл бұрын
You are awesome..I admired a lot about your videos..I ha ve one suggestion ..can you please do a Xamarin Forms full course ?
@TheCodeholic
@TheCodeholic 4 жыл бұрын
Thanks. Unfortunately I don't have any experience on Xamarin.
@InverserPro
@InverserPro 2 жыл бұрын
Thank You so much!
@pareshdawda8854
@pareshdawda8854 Жыл бұрын
Hi Zura, Thank you for sharing this great tutorial. I am learning to implement my code better. I have a request and am hoping you can help me (and others). I need to implement cascading dropdown selects within the confines of the MVC framework. Can you please advise how this can be done.
@zunpaingyellhtun9886
@zunpaingyellhtun9886 4 жыл бұрын
thanks a lot :) for this video
@vietanhphan4788
@vietanhphan4788 3 жыл бұрын
I have a question. Why I use ob_start and ob_get_clean() and then when render view is nothing show, but when I replace return by print_r this show html content on web.
@leoworker1752
@leoworker1752 3 жыл бұрын
You need to get .htaccess first before start watching this course for escape some errors: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php --------------------------THEN REWRITE TO:----------------------------------- RewriteEngine On # Stop processing if already in the /public directory RewriteRule ^public/ - [L] # Static resources if they exist RewriteCond %{DOCUMENT_ROOT}/public/$1 -f RewriteRule (.+) public/$1 [L] # Route all other requests RewriteRule (.*) public/index.php [L]
@arthurderyckere8732
@arthurderyckere8732 3 жыл бұрын
(FOR kzbin.info/www/bejne/bHa1lahqoJtlras) As of PHP 8.0, call_user_func needs an instantiated class as a parameter for non-static methods in the class. So instead of : SiteController::class write new SiteController( )
@arthurderyckere8732
@arthurderyckere8732 3 жыл бұрын
Later in the video, a check is placed before using the callback to instantiate the class. kzbin.info/www/bejne/bHa1lahqoJtlras
@ebubabangida
@ebubabangida 4 ай бұрын
thank you bro form ET.
@AtomTCP
@AtomTCP 2 жыл бұрын
How to fix if have example : Route::get("/office", function () { return ("Hi from office page!"); }); and if i add localhost/office/ (if i add slash i will get error 404) how to remove that slash sensitive in url
@wibowomuhmmad
@wibowomuhmmad 4 жыл бұрын
Yesss finally
@DucMinhTeaching
@DucMinhTeaching 3 жыл бұрын
Hi, How come you don't have to use use app\core\Application; or use app\core\Controller; in SiteController.php at 1:03:00??? Thank you
@An-Nur_Info-Tech
@An-Nur_Info-Tech 2 жыл бұрын
I tried integrating bootstrap with composer require twbs/bootstrap instead of the CDN linking, after everything were downloaded into vendor folder I linked it in the main.php but it's not working out. Any help on this please.
@simonedagostino8760
@simonedagostino8760 3 жыл бұрын
Hello. If I have two different tables in the database (users and complete_profile), how do I insert the values ​​sent by the registration into both tables?
Create a Custom PHP MVC Framework in Just 1 Hour | Intermediate
45:55
Coding with Pixel Fix
Рет қаралды 2,2 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,4 МЛН
PHP For Absolute Beginners | 6.5 Hour Course
6:27:22
Traversy Media
Рет қаралды 686 М.
Dynamic Programming - Learn to Solve Algorithmic Problems & Coding Challenges
5:10:02
PHP Full Course for non-haters 🐘
4:00:00
Bro Code
Рет қаралды 1,8 МЛН
Are we going back to PHP with fullstack JavaScript?
9:57
Maximilian Schwarzmüller
Рет қаралды 156 М.
PHP For Beginners | 3+ Hour Crash Course
3:15:36
Traversy Media
Рет қаралды 804 М.
PHP For Beginners -  Complete Laracasts Course
10:44:12
Laracasts
Рет қаралды 189 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН