- Star (is_starred) and colored tags for services, customers, orders, invoices:
Markable trait, tags/taggables tables, PATCH administrator/marks/{type}/{key},
tag CRUD, list filters starred / tag_ids[]
- GET administrator/services accepts product_type (falls back to product type
for legacy rows without services.type)
- Mail campaigns: bulk cancel / retry failed / delete; cancelled campaigns are
skipped by SendMailCampaignRecipient
- POST administrator/settings/test-smtp sends a test email through the saved
mail transport
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
942 B
PHP
30 lines
942 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Api\Admin;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class CustomerResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'uuid' => $this->uuid,
|
|
'fullname' => $this->fullname,
|
|
'email' => $this->email,
|
|
'phone' => $this->phone,
|
|
'company' => $this->company,
|
|
'note' => $this->note,
|
|
'status' => (int) $this->status,
|
|
'total' => (int) $this->total,
|
|
'email_marketing' => (bool) $this->email_marketing,
|
|
'receive_deposit' => (bool) $this->receive_deposit,
|
|
'created_at' => $this->created_at,
|
|
'is_starred' => (bool) $this->is_starred,
|
|
'tags' => $this->whenLoaded('tags'),
|
|
];
|
|
}
|
|
}
|