add controllers, servoices
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Discounts;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class DiscountVoucherResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'code' => $this->code,
|
||||
'discount_type' => $this->discount_type,
|
||||
'discount_value' => $this->discount_value,
|
||||
'max_uses' => $this->max_uses,
|
||||
'times_used' => $this->times_used,
|
||||
'valid_from' => $this->valid_from,
|
||||
'valid_until' => $this->valid_until,
|
||||
'is_active' => (bool) $this->is_active,
|
||||
'description' => $this->description,
|
||||
'school_year' => $this->school_year,
|
||||
'semester' => $this->semester,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user