2
votes

I'm setup homestead in my pc then i'm try to access my files via local domain. But when i'm trying to connect with DB then showing me this error. I can't access my others projects too. I setup everything very well. But i don't know why showing me this error.

Note: I'm using windows 8.1

Here is my setup code:

  1. Homestead.yaml

ip: "192.168.10.10"

memory: 2048

cpus: 1

provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:

- ~/.ssh/id_rsa

folders:

- map: F:/xampp/htdocs/Projects
  to: /home/vagrant/Projects

sites:

- map: govt-university.dev
  to: /home/vagrant/Projects/govt-university/public

- map: voyager.dev
  to: /home/vagrant/Projects/voyager/public

- map: evaluationplus.dev
  to: /home/vagrant/Projects/laravel-evaluationplus/public

- map: laravel-university.dev
  to: /home/vagrant/Projects/laravel-evaluationplus/public

databases: - homestead


  1. Host file

    192.168.10.10 govt-university.dev
    
    192.168.10.10 voyager.dev
    
    192.168.10.10 evaluationplus.dev
    
    192.168.10.10 laravel-university.dev
    

  1. ENV file

    APP_NAME= Laravel

    APP_ENV=local

    APP_KEY=base64:nmcR0V2cbq+26H3EBdLmYRQN5bkiOryROTxHpvUzuvA=

    APP_DEBUG=true

    APP_LOG_LEVEL=debug

    APP_URL=http://voyager.dev

    DB_CONNECTION=mysql

    DB_HOST=127.0.0.1

    DB_PORT=3306

    DB_DATABASE=voyager

    DB_USERNAME=homestead

    DB_PASSWORD=secret


Error Image: enter image description here

Please help me to solve this problem. Thanks

2
it is showing that there is no tables in your database. check your database again or try to migrate/seed tables.スージン
can you please show me your settings model?スージン
try changing 127.0.0.1 to localhostvinay kumar reddy
Are you 100% sure that you migrated this database in Homestead and not on your local machine?Marcin Nabiałek
What's your table name and whats the corresponding model name ?partho

2 Answers

1
votes

You need to ssh into Vagrant and then run artisan command to migrate database. Once you do this will be fixed.

-1
votes

Have you tried

php artisan migrate