update project

This commit is contained in:
root
2026-05-30 01:11:35 -04:00
parent 3a0628ecc7
commit 2225f6bc72
9743 changed files with 1122482 additions and 59 deletions
@@ -0,0 +1,24 @@
<?php declare(strict_types=1);
namespace App\Http\Resources\V2\Students;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
final class GuardianResource extends JsonResource
{
public function toArray(Request $request): array
{
$value = $this->resource;
if (is_array($value)) {
return $value;
}
if (is_object($value) && method_exists($value, 'toArray')) {
return $value->toArray();
}
if (is_object($value)) {
return get_object_vars($value);
}
return ['value' => $value];
}
}