Connecting to database | Laravel 10 Tutorial : #8

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ต.ค. 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

ความคิดเห็น • 34

  • @lawp3537
    @lawp3537 9 หลายเดือนก่อน +4

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

    • @yelocode
      @yelocode  9 หลายเดือนก่อน

      Thanks for watching

    • @sebaszwarc
      @sebaszwarc 8 หลายเดือนก่อน

      what a shit framework

    • @armin_usa
      @armin_usa 7 หลายเดือนก่อน

      why@@sebaszwarc

    • @sebaszwarc
      @sebaszwarc 7 หลายเดือนก่อน

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

  • @nikolamiletic6991
    @nikolamiletic6991 ปีที่แล้ว +4

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

    • @yelocode
      @yelocode  ปีที่แล้ว +1

      Glad the videos are helpful. Thank you for watching.

    • @nikolamiletic6991
      @nikolamiletic6991 ปีที่แล้ว

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

    • @yelocode
      @yelocode  ปีที่แล้ว

      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 ปีที่แล้ว

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

  • @jymoshepherd3005
    @jymoshepherd3005 2 หลายเดือนก่อน

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

  • @engenglish610
    @engenglish610 10 หลายเดือนก่อน +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  9 หลายเดือนก่อน +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

  • @AvinashKumar-ps8ft
    @AvinashKumar-ps8ft 27 วันที่ผ่านมา

    How to install your code (github) from fresh.. i accidently delete mine code?
    There is no .env file.
    i have my db in oracle. all tables are intact in oracle DB..

  • @FilipStraka-w6g
    @FilipStraka-w6g 4 หลายเดือนก่อน

    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

  • @rfldno
    @rfldno หลายเดือนก่อน

    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?

  • @lymengtek3986
    @lymengtek3986 7 หลายเดือนก่อน +1

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

    • @yelocode
      @yelocode  7 หลายเดือนก่อน

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

  • @arundivakar3644
    @arundivakar3644 11 หลายเดือนก่อน +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  11 หลายเดือนก่อน +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/

  • @HollyDiver-pn2ep
    @HollyDiver-pn2ep 4 หลายเดือนก่อน +1

    what if I got xampp instead of mysql?

    • @yelocode
      @yelocode  4 หลายเดือนก่อน

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

  • @ebubeanthony6699
    @ebubeanthony6699 8 หลายเดือนก่อน

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

    • @wimu7957
      @wimu7957 7 หลายเดือนก่อน +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 6 หลายเดือนก่อน

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

  • @marconarca2706
    @marconarca2706 7 หลายเดือนก่อน

    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  7 หลายเดือนก่อน

      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 7 หลายเดือนก่อน

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

  • @hernanidomingo35
    @hernanidomingo35 7 หลายเดือนก่อน

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

    • @hernanidomingo35
      @hernanidomingo35 7 หลายเดือนก่อน

      i sh8t, i forgot the semicolon. lol

    • @yelocode
      @yelocode  7 หลายเดือนก่อน

      It happens to the best of us.

  • @sebaszwarc
    @sebaszwarc 8 หลายเดือนก่อน

    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.