-
-
Notifications
You must be signed in to change notification settings - Fork 107
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't pass settings to ResourceCollection #121
Comments
What's the use case for passing settings objects into a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using this package in an SPA-based application where laravel is acting as the API.
I was trying to serve the settings as json but I wanted to serve all the properties in the DB. I tried passing the $settings instance to the ResourceCollection, but of course it did not work.
My main question is, is accessing the settings via
$settings = \Spatie\LaravelSettings\Models\SettingsProperty::where('group', 'groupname')->get();
the appropriate way to get them for passing to a ResourceCollection? Or is there a more streamlined way to do it via my defined InsertnamehereSettings class?The text was updated successfully, but these errors were encountered: