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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm talking about a feature something like vuemc.io directly embedded into
inertia
Imagine having a User model object on your javascript side, passed directly onto the prop.
this model could have actions like
can()
. you then just writethis.$page.props.user.can('create user')
or maybe to have all Laravel Resource Route directly available in the model. so that we can have something like
this.$page.props.user.update({ name: "foo", email: "[email protected]" })
we don't need to write
this.$inertia.post('/user/update', { ... })
and if we need to create models for our own models we can just extend
inertia/models
and it'll instantly have those awesome features.the
collection
also works the same.Beta Was this translation helpful? Give feedback.
All reactions