Tenant management
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Admin\Controllers;
|
||||
|
||||
use App\Models\Tenant;
|
||||
use App\Scopes\CommonController;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ManagedTenantPaymentGetController extends CommonController
|
||||
{
|
||||
public function __invoke(string $slug, Request $request): JsonResponse
|
||||
{
|
||||
$tenant = Tenant::where('slug', $slug)->firstOrFail();
|
||||
|
||||
return response()->json([
|
||||
'account_iban' => $tenant->account_iban,
|
||||
'account_bic' => $tenant->account_bic,
|
||||
'account_name' => $tenant->account_name,
|
||||
'saveEndpoint' => '/api/v1/admin/tenants/' . $slug . '/payment',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user