feat: implement FeaturedGroup and FeaturedVariant controllers, models, requests, resources, and routes for managing featured groups and variants
This commit is contained in:
19
app/Domains/Catalog/Resources/FeaturedVariantResource.php
Normal file
19
app/Domains/Catalog/Resources/FeaturedVariantResource.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\Catalog\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class FeaturedVariantResource extends JsonResource
|
||||
{
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'featured_group_id' => $this->featured_group_id,
|
||||
'product_variant_id' => $this->product_variant_id,
|
||||
'order' => $this->order,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user