Laravel 8 , Laravel 7 , Laravel , Laravel 6
Today i am explained to the how to use laravel custom config file in your project. This article will give you simple example of laravel custom config file. I will help for you in this exampleof laravel custome configration file. I explained simply about how to use laravel custom config file.
I would like to share with you add laravel custom config file.You can easily create custom configuration file with laravel 6, laravel 7 and laravel 8 application.
Let's get started with create your own config file laravel.
step 1: using env() helper
API_TOKEN = custome_file
step 2: using config() helper
'api_token' => env('GOOGLE_API_TOKEN', 'your-some-default-value'),
* The attributes that are mass assignable.
* @var array
public function helper()
$apiToken = config('google.api_token');
now you can check your own.
i hope it can help you...