thetispro / laravel5-setting

Persistent configuration settings for Laravel 5.x with json file(s)
MIT License
26 stars 5 forks source link

Unable to access Setting::get() in config/app.php #4

Closed tusharvikky closed 8 years ago

tusharvikky commented 8 years ago

Hello,

If we dump Setting::get(); in routes it works all fine. However, when we try to use these configs in config files published we are unable to do that. Throws:

Fatal error: Class 'Setting' not found in /Users/username/Sites/laravel/config/stream-laravel.php on line 15
thetispro commented 8 years ago

You have to import the full namespace

<?php namespace xxxxxxxx; use Thetispro\Setting\Setting; … $mySetting=Setting::get(…);

OR

use \ that will specify that the name is required from the global space even in the context of the namespace

$mySetting=\Setting::get(…);