feat: implement tenant management system including CRUD operations and domain bootstrapping functionality
This commit is contained in:
@@ -19,10 +19,7 @@ class TenantController extends Controller
|
||||
|
||||
public function store(StoreTenantRequest $request): JsonResponse
|
||||
{
|
||||
$validated = $request->validated();
|
||||
$props = $validated['props'] ?? [];
|
||||
|
||||
$tenant = Tenant::createWithProps($validated, $props);
|
||||
$tenant = Tenant::query()->create($request->validated());
|
||||
|
||||
return TenantResource::make($tenant)->response()->setStatusCode(201);
|
||||
}
|
||||
@@ -34,10 +31,7 @@ class TenantController extends Controller
|
||||
|
||||
public function update(UpdateTenantRequest $request, Tenant $tenant): TenantResource
|
||||
{
|
||||
$validated = $request->validated();
|
||||
$props = $validated['props'] ?? [];
|
||||
|
||||
$tenant->updateWithProps($validated, $props);
|
||||
$tenant->update($request->validated());
|
||||
|
||||
return TenantResource::make($tenant);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user