DEV Community

Vicky Alvando
Vicky Alvando

Posted on

Online Test - Set Up Project #1

Step 1 - Create Laravel Poject

composer create-project --prefer-dist laravel/laravel:9.3.1 online-test
Enter fullscreen mode Exit fullscreen mode

Step 2 - Timezone Configuration
Please open the file config/app.hp, then look for the folowing code

'timezone' => 'UTC',


'locale' => 'en',
Enter fullscreen mode Exit fullscreen mode

And change it to be like this

'timezone' => 'Asia/Jakarta',

'locale' => 'id',
Enter fullscreen mode Exit fullscreen mode

Step 3 - Database Configuration
To connect the laravel project to the database, we just need to make a few changes in the .env. Please open the file, the look for the following code:

DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
Enter fullscreen mode Exit fullscreen mode

After that, change it to be like this

DB_DATABASE=online_test
DB_USERNAME=root
DB_PASSWORD=
Enter fullscreen mode Exit fullscreen mode

After successsfully configuring the database connection, the next step is to create the database with the name online_test.

Top comments (0)