You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+1-16Lines changed: 1 addition & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -427,22 +427,7 @@ Laraconfig uses one single bag called `default`. If you have declared in the man
427
427
428
428
```php
429
429
// app/Models/User.php
430
-
431
-
/**
432
-
* Returns the bags this model uses for settings.
433
-
*
434
-
* @return array|string
435
-
*/
436
-
public function getSettingsBags(): array|string
437
-
{
438
-
$bags = ['notifications'];
439
-
440
-
if ($this->is_premium) {
441
-
$bags[] = 'theme';
442
-
}
443
-
444
-
return $bags;
445
-
}
430
+
i
446
431
```
447
432
448
433
The above will apply a filter to the query when retrieving settings from the database. This makes easy to swap bags when a user has a different role or property, or programmatically.
0 commit comments