Friday, March 3, 2017

Laravel package make config global

I'm making my first Laravel 5.4 package. But there is one configuration item that I use a lot. Looks like this:

config('increment-decrement.order_row_name');

My config file:

<?php

return [
    'order_row_name' => 'order'
];

So is it possible to make this global? Because right not I'm using that ^ 6 times in several different classes.

Thanks a lot.



via Jamie

Advertisement