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/ledger.corals.io/Corals/core/Settings/Transformers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/ledger.corals.io/Corals/core/Settings/Transformers/CustomFieldSettingTransformer.php
<?php

namespace Corals\Settings\Transformers;

use Corals\Foundation\Transformers\BaseTransformer;
use Corals\Settings\Models\CustomFieldSetting;

class CustomFieldSettingTransformer extends BaseTransformer
{
    public function __construct($extras = [])
    {
        $this->resource_url = config('settings.models.custom_field_setting.resource_url');

        parent::__construct($extras);
    }

    /**
     * @param CustomFieldSetting $setting
     * @return array
     * @throws \Throwable
     */
    public function transform(CustomFieldSetting $setting)
    {
        $transformedArray = [
            'id' => $setting->id,
            'model' => class_basename($setting->getAttribute('model')),
            'created_at' => format_date($setting->created_at),
            'updated_at' => format_date($setting->updated_at),
            'action' => $this->actions($setting)
        ];

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

Spamworldpro Mini