Connecting to database | Laravel 10 Tutorial : #8

Sdílet
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

Komentáře • 34

  • @lawp3537
    @lawp3537 Před 8 měsíci +3

    2 years with PHP, sure loving Laravel, thank you!! Yelo

    • @yelocode
      @yelocode  Před 8 měsíci

      Thanks for watching

    • @sebaszwarc
      @sebaszwarc Před 7 měsíci

      what a shit framework

    • @armin_usa
      @armin_usa Před 6 měsíci

      why@@sebaszwarc

    • @sebaszwarc
      @sebaszwarc Před 6 měsíci

      @@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

  • @jymoshepherd3005
    @jymoshepherd3005 Před měsícem

    Great Tutorial Loving i. No error so far on my case. Learning Tutorial by tutorial

  • @nikolamiletic6991
    @nikolamiletic6991 Před rokem +3

    Stating to learn PHP and this tut is very detailed and informative and easy to follow

    • @yelocode
      @yelocode  Před rokem +1

      Glad the videos are helpful. Thank you for watching.

    • @nikolamiletic6991
      @nikolamiletic6991 Před rokem

      @@yelocode Can you please show how to connect database with postgres cause im having some issues?

    • @yelocode
      @yelocode  Před rokem

      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.

    • @nikolamiletic6991
      @nikolamiletic6991 Před 11 měsíci

      hey, sorry was busy. So I still have issues can you please make a video about when you have time ;D @@yelocode

  • @brixjohnnovesteras8360
    @brixjohnnovesteras8360 Před 5 měsíci +3

    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

    • @ArMor-dp7nb
      @ArMor-dp7nb Před 28 dny

      Nah that's not the right solution he's using xampp

  • @rfldno
    @rfldno Před dnem

    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?

  • @engenglish610
    @engenglish610 Před 9 měsíci +1

    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?

    • @yelocode
      @yelocode  Před 8 měsíci +1

      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

  • @arundivakar3644
    @arundivakar3644 Před 10 měsíci +1

    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

    • @yelocode
      @yelocode  Před 10 měsíci +3

      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/

  • @user-hn3wf5dq7p
    @user-hn3wf5dq7p Před 2 měsíci

    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

  • @lymengtek3986
    @lymengtek3986 Před 6 měsíci +1

    Can laravel be use with mongoDB and if is possible, how do i do it?

    • @yelocode
      @yelocode  Před 6 měsíci

      Yes, it's possible, the mongo db website has a pretty good tutorial on it : www.mongodb.com/compatibility/mongodb-laravel-integration

  • @HollyDiver-pn2ep
    @HollyDiver-pn2ep Před 3 měsíci +1

    what if I got xampp instead of mysql?

    • @yelocode
      @yelocode  Před 3 měsíci

      The process should be the same. Just make sure you have started the mysql from your xampp control panel

  • @marconarca2706
    @marconarca2706 Před 6 měsíci

    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

    • @yelocode
      @yelocode  Před 6 měsíci

      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

    • @marconarca2706
      @marconarca2706 Před 6 měsíci

      @@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

  • @ebubeanthony6699
    @ebubeanthony6699 Před 7 měsíci

    Hi,
    Please how can I connect my laravel project to mysql if I'm using xampp on my pc.

    • @wimu7957
      @wimu7957 Před 6 měsíci +4

      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

    • @walaawalaawlwl9935
      @walaawalaawlwl9935 Před 5 měsíci

      ​@@wimu7957please i don't understand can you please tell me about this please

  • @hernanidomingo35
    @hernanidomingo35 Před 6 měsíci

    "show tables" does not show any table to me. i followed every step

  • @sebaszwarc
    @sebaszwarc Před 7 měsíci

    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.