How to Publish Config Files in Laravel 11

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:

publish-config-file-in-laravel-11

publish-cors-config-file-in-laravel-11

 

Laravel 11 Publish All 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:

techsolutionstuff

Techsolutionstuff | The Complete Guide

I'm a software engineer and the founder of techsolutionstuff.com. Hailing from India, I craft articles, tutorials, tricks, and tips to aid developers. Explore Laravel, PHP, MySQL, jQuery, Bootstrap, Node.js, Vue.js, and AngularJS in our tech stack.

RECOMMENDED POSTS

FEATURE POSTS