Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
namespace HiEvents\Resources\Account;
use HiEvents\Resources\BaseResource;
use Illuminate\Http\Request;
class AdminAccountResource extends BaseResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->resource->id,
'name' => $this->resource->name,
'email' => $this->resource->email,
'timezone' => $this->resource->timezone,
'currency_code' => $this->resource->currency_code,
'created_at' => $this->resource->created_at,
'suspended_at' => $this->resource->suspended_at,
'events_count' => $this->resource->events_count ?? 0,
'users_count' => $this->resource->users_count ?? 0,
'users' => $this->resource->users->map(function ($user) {
return [
'id' => $user->id,
'first_name' => $user->first_name,
'last_name' => $user->last_name,
'email' => $user->email,
'role' => $user->pivot->role,
];
}),
'messaging_tier' => $this->resource->messagingTier ? [
'id' => $this->resource->messagingTier->id,
'name' => $this->resource->messagingTier->name,
] : null,
];
}
}