can('inventory.view') || $user->can('inventory.update'); } /** * Determine whether the user can view the item. */ public function view(User $user, Item $item): bool { return $user->tenant_id === $item->tenant_id && ($user->can('inventory.view') || $user->can('inventory.update')); } /** * Determine whether the user can create items. */ public function create(User $user): bool { return $user->can('inventory.create'); } /** * Determine whether the user can update the item. */ public function update(User $user, Item $item): bool { return $user->tenant_id === $item->tenant_id && $user->can('inventory.update'); } /** * Determine whether the user can delete the item. */ public function delete(User $user, Item $item): bool { return $user->tenant_id === $item->tenant_id && $user->can('inventory.delete'); } }