Spaces:
Running
Running
feat(membership): admin-driven account creation, real estate tier/investment work, in-progress monorepo migration state
b2dcf0f | namespace App\Shared\Validation; | |
| use App\Shared\Exceptions\ApiException; | |
| class OwnershipValidator | |
| { | |
| public function ensureOwner(?string $actualOwnerId, string $expectedOwnerId, string $message = 'The record is not available.'): void | |
| { | |
| if ($actualOwnerId === null || $actualOwnerId !== $expectedOwnerId) { | |
| throw new ApiException('RESOURCE_NOT_FOUND', $message, [], 404); | |
| } | |
| } | |
| } | |