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/modules/Utility/Transformers/Wishlist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/ledger.corals.io/Corals/modules/Utility/Transformers/Wishlist/WishlistTransformer.php
<?php

namespace Corals\Modules\Utility\Transformers\Wishlist;

use Corals\Foundation\Transformers\BaseTransformer;
use Corals\Modules\Utility\Models\Wishlist\Wishlist;

class WishlistTransformer extends BaseTransformer
{
    public function __construct($extras = [])
    {
        $this->resource_url = config('utility.models.wishlist.resource_url');

        parent::__construct($extras);
    }

    /**
     * @param Wishlist $wishlist
     * @return array
     * @throws \Throwable
     */
    public function transform(Wishlist $wishlist)
    {
        $transformedArray = [
            'object' => '<a href="' . $wishlist->wishlistable->getShowURL() . '" target="_blank">' . $wishlist->wishlistable->getIdentifier() . '</a>',
            'id' => $wishlist->id,
            'user_id' => $wishlist->user->full_name,
            'created_at' => format_date($wishlist->created_at),
            'action' => $this->actions($wishlist)
        ];

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

Spamworldpro Mini