rawilk / laravel-settings

Store Laravel application settings in the database.
https://randallwilk.dev/docs/laravel-settings
MIT License
197 stars 17 forks source link

set() function doesn't work without specifying `$teamId` if Teams is disabled #69

Closed alexvlrt closed 1 month ago

alexvlrt commented 1 month ago

Laravel Settings

v3.4.0

Laravel Version

v10.48.12

Bug description

Having Teams feature disabled, when using Setting::set() without specifying the $teamId parameter is resulting in Column not found: 1054 Unknown column 'team_id' in 'where clause' error

From what I see, the set function of the Setting model is defaulting the $teamId parameter to null, while in the condition inside the function is checking with !== false

image

Steps to reproduce

Relevant log output

No response

alexvlrt commented 1 month ago

My bad, seems that I was calling the model directly, and not the facade It was one letter difference between Setting model and Settings facade

Sorry