ok

Mini Shell

Direktori : /home2/selectio/www/limpiar.in.net/updates/app/Http/Resources/V2/
Upload File :
Current File : //home2/selectio/www/limpiar.in.net/updates/app/Http/Resources/V2/BannerCollection.php

<?php

namespace App\Http\Resources\V2;

use Illuminate\Http\Resources\Json\ResourceCollection;

class BannerCollection extends ResourceCollection
{
    public function toArray($request)
    {
        return [
            'data' => $this->collection->map(function($data) {
                return [
                    'photo' => uploaded_asset($data),
                    'url' => route('home'),
                    'position' => 1
                ];
            })
        ];
    }

    public function with($request)
    {
        return [
            'success' => true,
            'status' => 200
        ];
    }
}

Zerion Mini Shell 1.0