How To Use Laravel Settings With Livewire? #152
-
I'm using Livewire for my project on localhost and want to try laravel-settings. Documentation shows using with controllers. But I'm not using controllers, using Livewire components. And I don't know how to use settings with Livewire. I couldn't find anything about this. Is there anyone could share some example for this? |
Beta Was this translation helpful? Give feedback.
Answered by
rubenvanassche
Sep 7, 2022
Replies: 1 comment 2 replies
-
You can inject settings anywhere you can inject something from the Laravel container. I think calling |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
reasecret
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can inject settings anywhere you can inject something from the Laravel container. I think calling
resolve(GlobalSettings::class)
within your livewire component should work.