645 B
645 B
Plan — 070 Workspace create: ensure creator membership
Tech
- Laravel 12
- Filament v5 + Livewire v4
Approach
- Hook into the Workspaces resource create page lifecycle (CreateRecord) to run post-create logic.
- Create (or ensure) a
workspace_membershipsrow for the creator with roleowner. - Set the created workspace as the current workspace in
WorkspaceContext. - Add a Pest regression test that creates a workspace via the Filament create page and asserts membership exists.
Files
app/Filament/Resources/Workspaces/Pages/CreateWorkspace.phptests/Feature/Workspaces/CreateWorkspaceCreatesMembershipTest.php