How to Publish Config Files in Laravel 11?

By Hardik Savani September 4, 2024 Category : Laravel

Hi,

In this short post, we will show you how to publish config files in laravel 11 framework.

Laravel 11 comes with a slimmer application skeleton. Laravel 11 introduce streamlined application structure, per-second rate limiting, health routing etc.

By default in Laravel 11, you will see empty config folders. If you want to change the configuration, you can do it using the .env file. However, if you need to make changes to config files, you need to publish them using an artisan command.

Laravel 11 provides the following commands to publish config files.

Laravel Publish Single Config File:

You can run the following command to publish a single config file:

php artisan config:publish

Now, you will have list of config files, choose one and it:

Laravel Publish All Config Files:

You can run the following command to publish all configuration files:

php artisan config:publish --all

Then you can work on it.

I hope it can help you...

Shares