skip to Main Content

i am trying to migrate my first migration in laravel 7 project i have created database in phpmyadmin. i have Laragon app for localServer, these are my .env code for database connection

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=portfolio-project
DB_USERNAME=root
DB_PASSWORD=

when i do php artisan migrate it tells me that migrations are migrated, but when i go to phpmyadmin for checking tables it says no tables in this database,

Is there any problem with my phpmyadmin?
O any issue in new version 7 of laravel?

because when i added a phpmyadmin to laragon app there was issue with login password of phpmyadmin,
default password was not working and then i think i edit of its files to make no password at login on phpmyadmin after that i just type root as use and login it works, other old version laravel pakgs are working but this new version of laravel is making this issue at php artisan migrate

2

Answers


  1. Make sure that every time you change your .env file you also do the following commands to clear any cache and make sure you are using the latest changes :

    php artisan config:clear
    php artisan cache:clear
    

    Also make sure that root has no password and you can login to phpmyadmin without one.

    Login or Signup to reply.
  2. First, close the server and the cmd and start it again then run the following command:

    php artisan config:clear
    

    Then run one of these commands:

    php artisan migrate:fresh 
    

    or

    php artisan migrate:refresh
    

    It will drop all tables and recreate them again with the new migrations.

    Hope it helps 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search