Laravel - How to configure project to open in XAMPP?

0

I have a project in Laravel , however for a specific reason I had to uninstall XAMPP and install again. Now I do not remember what I should change in the XAMPP configuration files to make the project run. I have already changed the project path in the xampp httpd file, but it does not run. When trying to run the php artisan migrate command gives the following error:

  

[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 \ heritage> php artisan migrate   [Illuminate \ Database \ QueryException]     SQLSTATE [42S02]: Table or view not found: 1146 Table 'sgpmehos_bd.permissions' does not exist (SQL: select * from permissions )   [PDOException]     SQLSTATE [42S02]: Table or view not found: 1146 Table 'sgpmehos_bd.permissions' does not exist

Does anyone have any guidance?

    
asked by anonymous 08.09.2018 / 15:43

2 answers

0

Have you set up the .env file in the Laravel database folder?

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

If you have already done so.

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

php artisan key: generate

afterwards.

php artisan cache: clear

after

php artisan config: cache

and finally start on the server.

php artisan serves.

    
13.09.2018 / 01:46
0

Check your migration file if it looks like this:

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

To create new table you must use Schema :: create

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