Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

How to get Settings from specific user? #34

Open
techguydev opened this issue Feb 6, 2020 · 1 comment
Open

How to get Settings from specific user? #34

techguydev opened this issue Feb 6, 2020 · 1 comment

Comments

@techguydev
Copy link

Hi, this package looks pretty interesting, although I can not find a way to get the settings for a specific user, something like this.

$user->settings;

Any thoughts?

@pathros
Copy link

pathros commented Jul 31, 2020

In the docs there is this example:

Specify a constraint value

The following sets and returns the setting "example" for the user with id of 23.

// Set 'example' setting to 'hello world'
Setting::set('example', 'hello world', 23);

// Save to database
Setting::save(23);

// Get the same setting
return Setting::get('example', null, 23);

Hopefully it fulfills what you need.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants