Basic signup for events
This commit is contained in:
@@ -6,19 +6,17 @@ use App\Models\Tenant;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class LocalGroupResource extends JsonResource {
|
||||
private Tenant $tenant;
|
||||
|
||||
public function __construct(Tenant $tenant) {
|
||||
$this->tenant = $tenant;
|
||||
parent::__construct($tenant);
|
||||
}
|
||||
|
||||
public function toArray($request) : array {
|
||||
return [
|
||||
'id' => $this->tenant->id,
|
||||
'name' => $this->tenant->name,
|
||||
'email' => $this->tenant->email,
|
||||
'city' => $this->tenant->city,
|
||||
'postalcode'=> $this->tenant->postcode
|
||||
'id' => $this->resource->id,
|
||||
'name' => $this->resource->name,
|
||||
'email' => $this->resource->email,
|
||||
'city' => $this->resource->city,
|
||||
'postalcode' => $this->resource->postcode,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user