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/PharmacistTransformer.php
<?php

namespace Corals\Modules\Syndicate\Transformers;

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

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

        parent::__construct($extras);
    }

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

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

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

}

Spamworldpro Mini