Source: azenmoktan.medium.com

How To Create Custom Config File In Laravel

Category: Laravel, PHP, api

Sign in Azen Moktan

Config folder contains one of the important files in laravel.it contains main setting for your laravel application for example database connection , Api keys ,queue etc.config returns an array .to access an array we need to use config key with file name and descendant key separate by dot(). For example if you have config file as//config/socialname.php To access this array of socialname.php file from config directoryyou have to use config keyword dd(config(‘socialname.social.facebook_username’)); A highly resourceful, innovative, and competent Software Engineer with extensive experience in the design , coding and problem solving .
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners