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
public function delete(User $user)
{
if ($user->hasActiveSubscription()) {
// User is still active payer
return Response::deny(__('policy.active_subscription'));
}
...
return Response::allow();
}
How can I combine Inertia with Laravel Policy?
Currently, I'm just getting a 403 modal popup.
Thank you 🤗
Edit:
Ok I could just use "can" like here https://inertiajs.com/authorization, but I hoped for a more lazy approach. Similar like in validation 😅
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
-
Hey stupid question, but I'm not sure how to handle this correctly.
I have installed Laravel Jetstream with Inertia and added a middleware for the deletion of a user.
Now in my UserPolicy I have added:
How can I combine Inertia with Laravel Policy?
Currently, I'm just getting a 403 modal popup.
Thank you 🤗
Edit:
Ok I could just use "can" like here https://inertiajs.com/authorization, but I hoped for a more lazy approach. Similar like in validation 😅
Beta Was this translation helpful? Give feedback.
All reactions