You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class BusinessResource extends JsonResource { public function toArray($request) { $resource = [ '_service' => 'user', '_resource' => 'businesses', ];
foreach ($this->getAttributes() as $attribute => $value) { switch ($attribute) { case 'name': case 'slug': case 'wallet': case 'files_volume': case 'cache': case 'calculated_at': case 'created_at': case 'updated_at': case 'deleted_at': $resource[$attribute] = $value; break; } }
return $resource; } }
|