Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Virgin: Get all configuration via `artisan tinker`

Sometimes during testing I need to be able to find out how my laravel application is configured using artisan tinker command.

The problem is that I do not know what to type in order to do that. In many cases that would be usefull to me because I would be able to have a quick look on how the database is configured on different enviromental settings.

like image 690
Dimitrios Desyllas Avatar asked Dec 30 '25 14:12

Dimitrios Desyllas


1 Answers

The requested tinker command (actually is direct php interpeter with laravel loaded) is the following:

config()->all();

With that you can have a look on how enviromental variables are resolved and what is loaded into your case.

like image 67
Dimitrios Desyllas Avatar answered Jan 01 '26 04:01

Dimitrios Desyllas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!