Files
mareike/app/Domains/Admin/Controllers/TenantContactGetController.php

29 lines
1009 B
PHP

<?php
namespace App\Domains\Admin\Controllers;
use App\Scopes\CommonController;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class TenantContactGetController extends CommonController
{
public function __invoke(Request $request): JsonResponse
{
return response()->json([
'email' => $this->tenant->email,
'email_finance' => $this->tenant->email_finance,
'invoice_sender_name' => $this->tenant->invoice_sender_name,
// Als Platzhalter im Formular: so heisst der Absender, solange nichts eingetragen ist.
'name' => $this->tenant->name,
'phone' => $this->tenant->phone,
'address_1' => $this->tenant->address_1,
'address_2' => $this->tenant->address_2,
'address_3' => $this->tenant->address_3,
'postcode' => $this->tenant->postcode,
'city' => $this->tenant->city,
'saveEndpoint' => '/api/v1/admin/tenant/contact',
]);
}
}