By John Koster
config_path($path = '')
The config_path function can be used to retrieve the path the config directory. It can also be used to construct paths relative to the configuration directory by supplying a $path.
The following examples will assume that the Laravel application is installed in the
/home/vagrant/Code/Laravel/ directory. The resulting path will appear above the function calls as a comment.
1<?php
2
3// /home/vagrant/Code/Laravel/config/
4config_path();
5
6// /home/vagrant/Code/Laravel/config/database.php
7config_path('database.php');
8
9// /home/vagrant/Code/Laravel/config/app.php
10config_path('app.php');
∎