Search code examples
phplaraveldatabase-migrationcore-ui

Core UI - Laravel -> Setting Up


I'm trying to make Core UI - Laravel work on my localhost (https://github.com/taboritis/coreui-laravel).

I have followed the steps. I can get to the login screen. I have created the John Doe user by running php artisan migrate:fresh --seed, and I also made the migrations.

I've tried to log in, but every time, I get this error:

SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from users where email = [email protected] limit 1)

My .env file looks like this:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=coreui
DB_USERNAME=root
DB_PASSWORD=root

My config/database.php file looks like this:

'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'coreui'),
            'username' => env('DB_USERNAME', 'root'),
            'password' => env('DB_PASSWORD', 'root'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],

I'm kind of stuck here. What should I do next?


Solution

  • Solved: For some reason I had to restart the web server and after several php artisan config:clear finally worked. Thanks everyone for your comments. You are all upvoted.

    Happy coding!