Add transferOwnership() method to the Workspace model that allows the
current owner to transfer ownership to another existing workspace member.
The method:
- Verifies the new owner is an existing member
- Demotes the current owner to admin role
- Promotes the new owner to owner role
- Updates team assignments when teams are in use
- Wraps the role changes in a DB transaction
- Dispatches WorkspaceOwnershipTransferred event
- Throws WorkspaceOwnershipException for auth/validation failures
New files:
- Events/WorkspaceOwnershipTransferred.php
- Exceptions/WorkspaceOwnershipException.php
- tests/Feature/WorkspaceOwnershipTransferTest.php
Fixes#35
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add phpunit.xml and tests/Pest.php for standalone test execution.
Apply Laravel Pint formatting fixes across all source files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplifies the namespace hierarchy by removing the intermediate Mod
segment. Updates all 118 files including models, services, controllers,
middleware, tests, and composer.json autoload configuration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>