-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not pass variable to Widget (via Config Array) #151
Comments
I may have some more info on this @arrilot , check below example please and hope it helps.
Works just fine and config/count gets updated. However something like below makes config array changes impossible with widget calls.
So in simple terms, if I define anything more than If I move all the additional functions inside |
Unfortunately I don't see any possible reasons why such behavior can happen. Wild guess: maybe you actually run your app on Laravel Octane instead of Apache. |
I also noticed that you used your own widget class in If you override |
Thanks for the reply, the main app is not using Laravel Octane and this is the Widget class we have in the app.
Will try using |
It was the
Closing this now, thanks again for your time and replies. |
Been using laravel-widgets for months, always used config arrays and had no problems until today ...
@widget('Modules\MyModule\Widgets\MyWidget', ['selection' => 'USERSELECTION'])
$this->config['selection'] is still 'DEFAULT'
Using 3.13.1 with Laravel 8.46.0 / Apache 2.4.46 with php 7.4.19
Everything else works just fine, controller returns data to blade as expected without errors, only the config is not being changed and always the default is used.
I even tried to get the user selection and apply some php string functions to see if the problem was upper/lower case but that did not worked too.
Any ideas ?
The text was updated successfully, but these errors were encountered: