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

namespace Corals\Modules\Syndicate\Transformers;

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

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

        parent::__construct($extras);
    }

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

        $transformedArray = [
            'id' => $council->id,
            'name' => HtmlElement('a', ['href' => $show_url], $council->pharmacist->name),
            'pharmacist' => $council->pharmacist->present('name'),
            'penalty' => HtmlElement('a', ['href' => $show_url], $council->penalty),
            'details' => HtmlElement('a', ['href' => $show_url], $council->details),
            'date_of_council' => format_date($council->date_of_council),
            'start_withdrawn_license' => format_date(optional($council->certificateBan)->start_withdrawn_license),
            'end_withdrawn_license' => format_date(optional($council->certificateBan)->end_withdrawn_license),
            'created_at' => format_date($council->created_at),
            'updated_at' => format_date($council->updated_at),
            'action' => $this->actions($council)
        ];

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

Spamworldpro Mini