Nuevos cambios hechos de diseño
This commit is contained in:
26
desarrollo2/app/Http/Resources/V2/FollowSellerResource.php
Normal file
26
desarrollo2/app/Http/Resources/V2/FollowSellerResource.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\V2;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class FollowSellerResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'shop_id'=> $this->shop->id,
|
||||
'shop_name'=> $this->shop->name,
|
||||
'shop_url'=> $this->shop->slug,
|
||||
'shop_rating'=> $this->shop->rating,
|
||||
'shop_num_of_reviews'=> $this->shop->num_of_reviews,
|
||||
'shop_logo' => uploaded_asset($this->shop->logo),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user