Monday, March 13, 2017

Laravel pass config data into trait's property

trait Foo {
    private $url = config('api.url');

}

I have a url data set inside of config, however I need to put this value into trait's property. But it's not working. anyone know how to solve this problem?



via Benjamin W

Advertisement