Connecting to database | Laravel 10 Tutorial : #8
Vložit
- čas přidán 6. 09. 2024
- Laravel 10 Blade tutorial
On this episode we cover how to connect to mysql or any database you like with use of laravels easy to use configuration system. We will then cover what are migrations and how to run them.
Mysql download link windows:
dev.mysql.com/...
Mysql mac homebrew install :
formulae.brew....
Playlist of Laravel 10 Tutorial Course :
• Laravel 10 Beginners C...
If you're new to Laravel 10 and want to learn about the Blade templating engine, then this is the video for you! In this video, we'll be covering all the basics of the Blade templating engine in Laravel 10. By the end of the video, you'll have a good understanding of how blade works and will be ready to start creating your own templates in Laravel 10!
What is Laravel :
Laravel is a free and open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model-view-controller architectural pattern and based on Symfony.
en.wikipedia.o...
If you have any questions or problems please leave a comment.
Laravel Blade
Laravel crash course
Laravel Database and crud tutorial
2 years with PHP, sure loving Laravel, thank you!! Yelo
Thanks for watching
what a shit framework
why@@sebaszwarc
@@armin_usa 1. It does not return informative error message when problem may lay in database config 2. Difficult to install on other machine than local host
Great Tutorial Loving i. No error so far on my case. Learning Tutorial by tutorial
Stating to learn PHP and this tut is very detailed and informative and easy to follow
Glad the videos are helpful. Thank you for watching.
@@yelocode Can you please show how to connect database with postgres cause im having some issues?
For postgres, please set the following in your .env file.
DB_CONNECTION = pgsql
DB_PORT = 5432
However, postgres does not have a default root user, so you need to create a user account and database yourself for local development.
The remaining configs such user username, password, and database db will be what you have created it postgress. It would be alot easier to create a new user with a GUI for interacting with the database, something like pgAdmin
Let me know if you still have issues, I will make a video on this.
hey, sorry was busy. So I still have issues can you please make a video about when you have time ;D @@yelocode
If you have getting error "mysql : The term 'mysql' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1" while trying to connect mysql.
u can solve this by following this tutorial czcams.com/video/XP1DntIzyyI/video.html
mine is working now
Nah that's not the right solution he's using xampp
I just started learning laravel, and I am concerned about the username in mysql and in the vscode. Does our username and password have to be the same as the one we set up on our sql?
Thank you for this valuable content 👍
Question 1: it's possible to use Redis as my principal database with Laravel?
Question 2: I know it's not recommended to use Redis as main database for website like Craigslist but I want to check if I can provide with redis a real time experience! What do you think about this?
Thanks for watching. I personally have not used redis as main database driver, only for caching.
By default laravel does not support using redis as datbase driver, but there is a package for it : github.com/bilaliqbalr/laravel-redis
Getting error "mysql : The term 'mysql' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1" while trying to connect mysql
This error is probably because you don't have mysql in your path or haven't installed mysql.
This tutorial might help you fix the issue : maheshwaghmare.com/mysql/how-to/not-recognized-as-an-internal-or-external-command/
I have question Yelo! Its problem when i have different tables after migration, as you ? Mine are:
| cache
| cache_locks
| failed_jobs
| job_batches
| jobs
| migrations
| password_reset_tokens
| sessions
| users
Can laravel be use with mongoDB and if is possible, how do i do it?
Yes, it's possible, the mongo db website has a pretty good tutorial on it : www.mongodb.com/compatibility/mongodb-laravel-integration
what if I got xampp instead of mysql?
The process should be the same. Just make sure you have started the mysql from your xampp control panel
I am getting this error "could not find driver (Connection: mysql, SQL: select * from information_schema.tables where table_catalog = db0sdbuq6rv59d and table_schema = public and table_name = migrations and table_type = 'BASE TABLE')" using xampp
Thanks for watching.
Make sure you have mysql started in xampp and also check this solution on stack overflow I think it should help solve your problem
stackoverflow.com/questions/42557693/laravel-pdoexception-could-not-find-driver
@@yelocode yeah I already tried it however I am using windows and I tried looking at their solution and the only thing it is sensible to me is that php.ini which I already did uncomment but still not working
Hi,
Please how can I connect my laravel project to mysql if I'm using xampp on my pc.
hy i know its late but u just create a laravel project run migration and it will ask u if u want to creat the db that was in ur .env then u write yes and boom open phpmyadmin ur db should be there
@@wimu7957please i don't understand can you please tell me about this please
"show tables" does not show any table to me. i followed every step
i sh8t, i forgot the semicolon. lol
It happens to the best of us.
Why connecting to database is lesson 8? this should be on the beginning especially when Laravel cannot connect to mysql even if this connects in terminal. No solution worked and unforntunately your tutorial does not answer the problem either which is bad from educational perspective.