Closed JeffeSouza closed 8 years ago
if you are using Laravel 5 could you create this simple route
Route::get('setting', function(){ \Setting::path(app_path().'/storage/meta/sub')->set('testPath','a'); \Setting::filename('setting2.json')->set('testFile','b'); \Setting::path(app_path().'/storage/meta/sub')->filename('dummy.json')->set('testPathAndFile','c');
$testPath=\Setting::path(app_path().'/storage/meta/sub')->get('testPath');
$testFile= \Setting::filename('setting2.json')->get('testFile');
$testPathAndFile=\Setting::path(app_path().'/storage/meta/sub')->filename('dummy.json')->get('testPathAndFile');
return $testPath.' '.$testFile.' '.$testPathAndFile;
});
It returns 'a b c' as as announced.
You can also adapt this code for a phpunit test. It still works !
Well in my case it does return the test path but they are not written on the sub file.
I'm trying to use a path and a different file, but it only works when I try to write the data, but when I try to read it always picks up the default file. And even when it writes, save only one setting, overlapping the previous configuration.