We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b6d6c5 commit 4bea9ceCopy full SHA for 4bea9ce
app/Models/User.ts
@@ -110,7 +110,9 @@ export default {
110
},
111
112
get: {
113
- fullName: (user: UserModel) => capitalize(user.name || ''),
+ fullName: (user: UserModel) => {
114
+ return user.name ? capitalize(user.name) : ''
115
+ },
116
117
118
set: {
storage/framework/core/types/src/model.ts
@@ -147,6 +147,10 @@ export interface ModelOptions extends Base {
147
relationName?: string
148
}[]
149
150
+ scopes?: {
151
+ [key: string]: (value: any) => any
152
+ }
153
+
154
get?: {
155
[key: string]: (value: any) => any
156
}
0 commit comments