Edit File: AdsResource.php
<?php namespace App\Http\Resources; use App\Models\Setting; use Illuminate\Http\Resources\Json\JsonResource; class AdsResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array */ public function toArray($request) { $profit = Setting::where('key', 'points_per_video')->first()->value; return [ 'id' => $this->id, 'profit' => $profit ?? '', 'cover' =>$this->cover? $this->CoverPath:'', ]; } }
Back to File Manager