Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/syn.corals.io/Corals/modules/Syndicate/Transformers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/syn.corals.io/Corals/modules/Syndicate/Transformers/TraineeTransformer.php
<?php

namespace Corals\Modules\Syndicate\Transformers;

use Corals\Foundation\Transformers\BaseTransformer;
use Corals\Modules\Syndicate\Models\Trainee;
use Throwable;

class TraineeTransformer extends BaseTransformer
{
    public function __construct($extras = [])
    {
        $this->resource_url = config('syndicate.models.trainee.resource_url');

        parent::__construct($extras);
    }

    /**
     * @param Trainee $trainee
     * @return array
     * @throws Throwable
     */
    public function transform(Trainee $trainee)
    {
        $show_url = $trainee->getShowURL();

        $transformedArray = [
            'id' => $trainee->id,
            'name' => HtmlElement('a', ['href' => $trainee->getShowURL()], $trainee->full_name),
            'email' => $trainee->email,
            'phone' => $trainee->phone_number,
            'exempt' => optional($trainee->exempt)->value ?? '-',
            'religion' => optional($trainee->religion)->value ?? '-',
            'archive' => optional($trainee->archive)->value ?? '-',
            'situation' => optional($trainee->situation)->value ?? '-',
            'passport' => optional($trainee->passport)->value ?? '-',
            'gender' => optional($trainee->gender)->value ?? '-',
            'status' => optional($trainee->status)->value ?? '-',
            'district' => optional($trainee->district)->value ?? '-',
            'city' => optional($trainee->city)->value ?? '-',
            'created_at' => format_date($trainee->created_at),
            'updated_at' => format_date($trainee->updated_at),
            'action' => $this->actions($trainee)
        ];

        return parent::transformResponse($transformedArray, $trainee);
    }
}

Spamworldpro Mini