Hey there! If you're diving into Laravel 11 and need to customize your configuration settings, you're in the right place. In this guide, I'll walk you through the straightforward process of publishing config files. In this, we'll see how to publish a config file in laravel 11.
In Laravel 11, the default setup includes empty config folders. While you can adjust configurations using the .env file, modifying config files requires a different approach. To make changes, you'll need to publish these files using an artisan command.
So, let's see laravel 11 publish an app config file, laravel 11 publish a database config file, and laravel 11 publish a config file command.
Run the following command to publish the config file in laravel 11.
php artisan config:publish
After running this command you will get a list of config files:
If you want to publish all configuration files in Laravel 11, Laravel provides a command specifically for this purpose.
Run the following command to publish all configuration files in laravel 11.
php artisan config:publish --all
You might also like: