0 0
Read Time:1 Minute, 39 Second

Basic Configuring in Laravel Project

If you are new to Laravel, you should know that you can create a configuration file for the Laravel application. And after installing Laravel, you need to perform the permission writing for your storage directory along with the bootstrap/cache.

Next, you must generate the application key for session securing and encrypted data keys. In case the root directory doesn’t have the .env file, in that case, you will have to rename the file .env.example to .env and run the command mentioned below where you’ve installed the Laravel:

php artisan key: generate

You can see in the .env file the newly generated key. In addition, it is possible to configure the locale time zone in your project’s config/app.php file.

Configuring the Environment

Laravel allows us to run an application for diverse environments like testing, production, etc. You will need the .env file in the project’s root directory to configure your application’s environment. When you install the composer for Laravel, the composer generates or creates this file automatically. If you don’t install it, then rename the specific file with the name .env.example to .env only.

Configuring the Database

You can configure the database for your application using the config/database.php file of your project. Setting the configuration constraint utilized by various databases can also be done, and Laravel also allowed us to use the default one.

Maintenance Modes

Websites are regularly modified. As s a developer for this, you have to put your site in maintenance mode. In this advanced framework, it becomes easier to do that by using two artisan commands. Let’s see how to use the commands:

For starting your project maintenance approach, the following command is required:

php artisan down

After changing the required stuff, when it is time to re-run your project, the following command is needed:

php artisan up
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Comment