How to connect to MySQL database with Laravel project
ฝัง
- เผยแพร่เมื่อ 8 ต.ค. 2024
- This is a complete tutorial, here, You will get learn How to connect to MySQL database with Laravel project.
Thank You For Visiting My Channel.
***** Subscribe & Support *****
#Laravel #MySQL #DB-Connection - วิทยาศาสตร์และเทคโนโลยี
Hidden code fix on line 13, timestamp [03:00]:
echo "Successfully connected to DB and DB name is " . DB::connection()->getDatabaseName();
thank youuu
Thank you so much!
thank you soooooooo much
Do not recommend, the code is incomplete and not fully shown in the tutorial.
agreed
Thanks man was harving a hard time connecting mysql because the tutorial I was following was used sqlite
Glad it helped!
use Illuminate\Support\Facades\DB;
this line needs to be added before the If condition
Thanks a lot, this video helped me to fix some issue that i took more then 5hours
You're welcome!
kya is way sy migrations me table wali files create ho jay gee?
Having error of " could not find driver"
same things
I'm having an "Undefined type 'DB' " error
this should fix it, and if you get
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.sessions' doesn't exist (Connection: mysql, SQL: select * from `sessions` where `id` = text tings limit 1)
do php artisan migrate
could not find driver error
thanks brother love
Always welcome
Thanks
Welcome