I\'m using a package within my project and it stores a setting inside config/packagename
I would like to dynamically change this value inside the config
config(['packagename.view_id' => Auth::user()->id]);
You can do like this.
In your custom config file. Add the following code You can send your id dynamically from the query string.
'view_id' => isset($_REQUEST['view_id'])?$_REQUEST['view_id']:null,
To get view id
echo config('app.view_id'); // app is config file name