Laravel - How to configure project to open in XAMPP?

Asked

Viewed 651 times

0

I have a project in Laravel, but for a specific reason I had to uninstall XAMPP and install again. Now I can’t remember what to change in the XAMPP configuration files to make the project run. I’ve already changed the project path in the xampp httpd file, but it doesn’t run. Trying to run php Artisan migrate command gives error following:

[Illuminate Database Queryexception] SQLSTATE[HY000] [1049] Unknown database 'sgpmehos_bd' (SQL: select * from permissions) [Pdoexception] SQLSTATE[HY000] [1049] Unknown database 'sgpmehos_bd' C: Users Lucas Dropbox TCC Vagrant www html TCC patrimonio>php Artisan migrate [Illuminate Database Queryexception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sgpmehos_bd.Permissions' doesn’t exist (SQL: select * from permissions) [Pdoexception] SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sgpmehos_bd.Permissions' doesn’t exist

Does anyone have any guidance?

  • The error of artisan is bank not found, bank missing (sgpmehos_bd), that bank exists ?

  • Yes, Virgilio. This database exists. I created the database, but running this command gives error.

2 answers

1

Check your Migration file if so:

Schema::table('tabela1', function ($table)  {
    // ... 
});´

To create new table should be used Schema::create

Schema::create('tabela1', function ($table)  {
    // ...
});

0


You have configured the file . env in the Laravel database folder?

Put your bank information in this file, stating the name of the bank, user and password.

If you’ve done it before.

Go to the terminal you are using in the directory of your application type:

php Artisan key:generate

afterward.

php Artisan cache:clear

afterward

php Artisan config:cache

and finally start on the server.

php Artisan serves.

  • Allan, I’m gonna check this out as soon as I get home and give you a call back.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.