I was quite mesmerized. I can swear it's the best tutorial series I've ever seen in my life. Your content is very high quality. Thanks to you, I learned very well how Laravel and similar frameworks are developed. When I'm bored, I watch the video series. I will code soon. Gold content. thank you so much
Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
Great ways todo alot of the items, but i suggest to change the following: change in .env file to be DB_DSN = "..." or do one parameter for each and create your own DSN string which makes you able to do $env = parse_ini_file(dirname(__DIR__).'\.env'); and no need for depending on vlucas/phpdotenv
Any advice for help with the migrations? I saw this comment on free code camp since it wasn't working the original code: 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; When I try to substantiate an instance with new $class, I get the following error: Cannot declare class m0001_initial, because the name is already in use. No namespace on a m000 files. Thanks!
Hi! I followed this tutorial and everything went good until 30:40, I made instance of class, but after during testing, I got the following error message: PHP Fatal error: Uncaught Error: Class 'm0001_initial' not found in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php:53 Stack trace: #0 /Library/WebServer/Documents/01_Sajat/PhpOopMVC/migrations.php(22): App\app\core\Database->applyMigrations() #1 {main} thrown in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php on line 53 Fatal error: Uncaught Error: Class 'm0001_initial' not found in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php:53 Stack trace: #0 /Library/WebServer/Documents/01_Sajat/PhpOopMVC/migrations.php(22): App\app\core\Database->applyMigrations() #1 {main} thrown in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php on line 53 belaf.@Bela-Mac-mini PhpOopMVC % Please, help to solve this problem! Thanks, Bela
I have exactly the same problem and I can' t find a solution . Only if inside database.php at the top insert use app\migrations\m0001_initial and create an instance like new m0001_initial() and not as value of variable $className works. Is there an explenation about this error -> Class 'm0001_initial' not found in. Thank you. Ok I found the problem. Because in the example we include the migration files to use them for instance if you have at the top of m0001_initial.php "use\migrations" then you have to remove this line. Hope this helps.
I'm having this particular error where I can't connect to my database and the error will refer to my PDO connection line. I'm sure that I've followed all the instructions carefully and there's no error before I reach to the connection part. Also when I try to run the local server using xampp, I got different type of error where it says Uncaught Error: Typed property app\core\Application::$controller must not be accessed before initialization. Why does it happens and why the error is different? Appreciate for any help.
For anyone having issues with Uncaught PDOException: SQLSTATE[3D000]: for some reason putting the port last worked for me. mysql:host=localhost;dbname=dbname;port=3306
Hello!! So cool! Am a new lunix mint user. Been trying to run migrations with no success. Please help😊. Watched tones and tones of videos but it's not working😫. Wanna be able to follow the creation of the framework alongside.
Hi! I really like your video. Until this part, everything went well and everything was okay, but now I got this error message: Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory. I'm using XAMP on macOS Catalina 10.15.7.
Is this how also in Frameworks like Laravel/CodeIgniter is done, because once I was able to grasp your lessons, I want to jump in to Laravel, so what I mean is I want to use your Lesson as a key in order for me to start learning Larave
Firat of all get familiar with OOP if you are not yet. I have a full playlist about Object Oriented PHP. This video series will definitelly help also to better understand how frameworks work.
@@TheCodeholic I think i`m quite familiar with OOP ever since 3 weeks ago I always used OOP to make my code reusable as much as possible but I`ll watch your OOP videos it`s good to refresh myself again about it even though I`ve been using it for a lot of times now
Hi, Thanks for your video and i have a problem on migration idont know how to handle this the problem is "Fatal error: Uncaught PDOException: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected in C:\xampp\htdocs\myFrameWork\core\Database.php". can you please tell me what wrong with it? Thanks!
@@TheCodeholic the name is correct i follow you step by step. Everything is fine expect this.. every time when I call CRUD func i need notation method(database.table).
Again great tutorial. Got migration class not found in core folder error when run migration. I know it should search migrations folder rather than core folder. I follow exact every steps including add require_once in the applyMigrations function. Any body can help? thanks
@@TheCodeholic Thanks for your reply. I mamually add full path to the ClassName variable to fix it. I think it's just my autoload setting is slightly different.
hi, i have a problem with connecting to database. i'm using lampp for mysql and for my other projects work just fine. but in this project i face this error: Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory . i run this project with php -S and without database connection work perfectly. can you help me with this? i setup virtual host for this project but also not working. i also install mysql-server with terminal but no diffrence. running ubuntu 20.04 .
@@TheCodeholic Thanks for answering. For future reference, you should completely uninstall xampp (lampp) and install php, apache2 and mysql and then you ready to go. I found installing guide in DigitalOcean website
wow man you don`t know how hard it is to make a video without making mistakes, can`t you even be grateful enough that he`s giving a FREE advance lecture about PHP
Thanks a lot man, all this content is gold. You are potentially the best PHP teacher on youtube. Please keep it up with your content
Thanks man
I was quite mesmerized. I can swear it's the best tutorial series I've ever seen in my life. Your content is very high quality. Thanks to you, I learned very well how Laravel and similar frameworks are developed. When I'm bored, I watch the video series. I will code soon. Gold content. thank you so much
Wow. Thanks buddy for such words.
Awesome series, what I most enjoy about this series is that you take us with you in your thought process about how to implement things and what the pros and cons are when you implement them. Thank you very much
Thank you my friend for such a nice comment.
Simply awesome how you demystify the features that laravel, symfony, etc have!
Thx a lot for this great tutorial! Learnt a lot!
Thank you Zura . Never stop teaching us 🙂🙂🙂🙂
Thanks to the best PHP teacher
Thank you
very good information tq for provoding great lectures. keep move on always providing good content.
Thanks buddy
Thank you so much for this amezing course.god bless you bro
Thanks a lot friend
Good Job, Please keep making such good content on php
I will try my best
Great ways todo alot of the items, but i suggest to change the following:
change in .env file to be DB_DSN = "..." or do one parameter for each and create your own DSN string
which makes you able to do
$env = parse_ini_file(dirname(__DIR__).'\.env');
and no need for depending on vlucas/phpdotenv
This series is excellent. Great job.
Awesome tutorial
Great lesson! Didn’t know this trick with converting array to string so PDO can eat an array like that :) php isn’t trendy but is still awesome tool
Thanks for video !! I'm feeling so profissional with your tutorials 😁😁😁!!
.
Thanks buddy 😀
Thank you again for very informative tutorial 🥇🥇🥇
My pleasure 😊
2:30 your cursor in the "File name" field is flashing differently than mine... ;D
Any advice for help with the migrations? I saw this comment on free code camp since it wasn't working the original code:
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;
When I try to substantiate an instance with new $class, I get the following error: Cannot declare class m0001_initial, because the name is already in use. No namespace on a m000 files. Thanks!
Hi!
I followed this tutorial and everything went good until 30:40, I made instance of class, but after during testing, I got the following error message:
PHP Fatal error: Uncaught Error: Class 'm0001_initial' not found in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php:53
Stack trace:
#0 /Library/WebServer/Documents/01_Sajat/PhpOopMVC/migrations.php(22): App\app\core\Database->applyMigrations()
#1 {main}
thrown in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php on line 53
Fatal error: Uncaught Error: Class 'm0001_initial' not found in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php:53
Stack trace:
#0 /Library/WebServer/Documents/01_Sajat/PhpOopMVC/migrations.php(22): App\app\core\Database->applyMigrations()
#1 {main}
thrown in /Library/WebServer/Documents/01_Sajat/PhpOopMVC/app/core/Database.php on line 53
belaf.@Bela-Mac-mini PhpOopMVC %
Please, help to solve this problem!
Thanks, Bela
I have exactly the same problem and I can' t find a solution . Only if inside database.php at the top insert use app\migrations\m0001_initial and create an instance like new m0001_initial() and not as value of variable $className works. Is there an explenation about this error -> Class 'm0001_initial' not found in. Thank you.
Ok I found the problem. Because in the example we include the migration files to use them for instance if you have at the top of m0001_initial.php "use\migrations" then you have to remove this line. Hope this helps.
very informative)
Thank you
how we can execute the down method from terminal ?
I'm having this particular error where I can't connect to my database and the error will refer to my PDO connection line. I'm sure that I've followed all the instructions carefully and there's no error before I reach to the connection part. Also when I try to run the local server using xampp, I got different type of error where it says Uncaught Error: Typed property app\core\Application::$controller must not be accessed before initialization. Why does it happens and why the error is different?
Appreciate for any help.
soltani dadash
For anyone having issues with Uncaught PDOException: SQLSTATE[3D000]:
for some reason putting the port last worked for me.
mysql:host=localhost;dbname=dbname;port=3306
Thanks for video 😘
How is the down() method triggered?
damet garm
Create a tutorial using AJAX sir, I`m quite curious on how you do it
Yeah, video on AJAX
Yeah agreed, ajax whit this course would be greate
hello , its okey if i used mysqli instead of pdo ?
May I know the reason why?
@@TheCodeholic I'm good at Mysqli but I've never used pdo before , will that affect something in the next episodes ?
Hello!! So cool! Am a new lunix mint user. Been trying to run migrations with no success. Please help😊. Watched tones and tones of videos but it's not working😫. Wanna be able to follow the creation of the framework alongside.
Hi!
I really like your video. Until this part, everything went well and everything was okay, but now I got this error message:
Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory.
I'm using XAMP on macOS Catalina 10.15.7.
Probably mysql is not started. Check it...
Hey, man. Can you please make a video about ORM and DBAL?
Do you will implement a DI container for this project?
No, I have not implemented it but I may update the framework and record on DI also if many people asks.
@@TheCodeholic Yes, I want this too
@@TheCodeholic Please make a dependency injector from scratch and include it in framework..It would be way more better
Thank you so much!
Is this how also in Frameworks like Laravel/CodeIgniter is done, because once I was able to grasp your lessons, I want to jump in to Laravel, so what I mean is I want to use your Lesson as a key in order for me to start learning Larave
Firat of all get familiar with OOP if you are not yet.
I have a full playlist about Object Oriented PHP.
This video series will definitelly help also to better understand how frameworks work.
@@TheCodeholic I think i`m quite familiar with OOP ever since 3 weeks ago I always used OOP to make my code reusable as much as possible but I`ll watch your OOP videos it`s good to refresh myself again about it even though I`ve been using it for a lot of times now
If you are good with OOP, go ahead and jump into Laravel or any other framework.
💫
what is the name of the theme u r using
23:04 how to auto complite var_dump() with echo '', thank you bro
You need to configure code snippet (Live template)
@@TheCodeholic thank
Hi, Thanks for your video and i have a problem on migration idont know how to handle this the problem is "Fatal error: Uncaught PDOException: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected in C:\xampp\htdocs\myFrameWork\core\Database.php". can you please tell me what wrong with it? Thanks!
its working with this method (database.table).. so did i miss something?
Make sure you have specified database name in configuration file
@@TheCodeholic the name is correct i follow you step by step. Everything is fine expect this.. every time when I call CRUD func i need notation method(database.table).
Again great tutorial. Got migration class not found in core folder error when run migration. I know it should search migrations folder rather than core folder. I follow exact every steps including add require_once in the applyMigrations function. Any body can help? thanks
I will check this when I will be at computer.
@@TheCodeholic Thanks for your reply. I mamually add full path to the ClassName variable to fix it. I think it's just my autoload setting is slightly different.
@@timwuuk if you remove the namespace in the m0001_initial.php and m0001_something.php files it will work
hi, i have a problem with connecting to database. i'm using lampp for mysql and for my other projects work just fine. but in this project i face this error: Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory . i run this project with php -S and without database connection work perfectly. can you help me with this? i setup virtual host for this project but also not working. i also install mysql-server with terminal but no diffrence. running ubuntu 20.04 .
Check which version of php you have and you need to install php-mysql package by running `apt install php-mysql`
@@TheCodeholic Thanks for answering.
For future reference, you should completely uninstall xampp (lampp) and install php, apache2 and mysql and then you ready to go.
I found installing guide in DigitalOcean website
@@mohammadtaheri98 are you serious?
Thank you!
Interesting video but I dont like the idea of using php in a view file, or generate dynamic html in a php file
Thanx
hame to bootcamp parashon rikhte
at last. Maybe you will open the videos every day insted of one video in two days?
wow man you don`t know how hard it is to make a video without making mistakes, can`t you even be grateful enough that he`s giving a FREE advance lecture about PHP