update project
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Attendance;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class AttendanceRecordResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Attendance;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class ScanResultResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Communication;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class MessageResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Communication;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class RecipientPreviewResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Finance;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class InvoiceResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Finance;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class PaymentResource 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];
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\IslamicSundaySchool;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class IslamicSundaySchoolStudentProfileResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\IslamicSundaySchool;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class QuranProgressReportResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Reporting;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class ReportExportResource 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];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\V2\Reporting;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
final class ReportResultResource 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];
|
||||
}
|
||||
}
|
||||
@@ -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 EnrollmentResource 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];
|
||||
}
|
||||
}
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
@@ -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 StudentResource 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];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user