add whatsup logic
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Whatsapp;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class WhatsappGroupLinkResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => (int) ($this->id ?? 0),
|
||||
'class_section_id' => (int) ($this->class_section_id ?? 0),
|
||||
'class_section_name' => (string) ($this->class_section_name ?? ''),
|
||||
'school_year' => (string) ($this->school_year ?? ''),
|
||||
'semester' => (string) ($this->semester ?? ''),
|
||||
'invite_link' => (string) ($this->invite_link ?? ''),
|
||||
'active' => (bool) ($this->active ?? false),
|
||||
'created_at' => $this->created_at ?? null,
|
||||
'updated_at' => $this->updated_at ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user