Dracool's avatar

Local Database Test without Homestead

Hi. I'm using laravel with xampp on windows 7. I want to go along with the Laravel Fundamentals tutorials but I'm having difficult time figuring out how to set the database up.

Previously with Codeigniter, I just made a function to connect to it. But now since Laravel is so automatic and comes pre-packaged I'm confused. I know that App/Database.php file holds all information about connecting to a database, but how do I do it with a local database?

I'm using port 127.0.0.1 at http://localhost/phpmyadmin/ to connect to my database. What do I change in the file?

0 likes
1 reply
Sulieman's avatar
Level 21
        'mysql' => [
            'driver'    => 'mysql',
            'host'      => 'localhost', // type here localhost
            'database'  => 'name_of_database', // create a new database from phpmyadmin and type the name here
            'username'  => 'root', // the username is root by default
            'password'  => '', // the password is null by default
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => '',
            'strict'    => false,
        ],

Please or to participate in this conversation.