mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 20:44:01 +00:00
05b1aedda5
# Conflicts: # app/Classes/Modules/Announcements/DataTransferObjects/AnnouncementObject.php # app/Classes/Modules/Segments/ControllersLogic/CreateSegmentLogic.php # app/Classes/Modules/Segments/ControllersLogic/DeleteSegmentLogic.php # app/Classes/Modules/Segments/DataTransferObjects/SegmentObject.php # app/Classes/Modules/Segments/Services/CreatesSegment.php # app/Classes/Modules/Segments/Standards/Rules/CanCreateSegment.php # app/Classes/Modules/Segments/Standards/Rules/CanDeleteSegment.php # app/Classes/Modules/Segments/Standards/Validators/SegmentValidation.php # app/Http/Controllers/Announcements/AssignAnnouncementToSegmentController.php # app/Http/Controllers/Announcements/ListAnnouncementsController.php # app/Http/Controllers/Announcements/RemoveSegmentFromAnnouncementController.php # app/Http/Controllers/Announcements/UpdateAnnouncementController.php # app/Http/Controllers/Segments/CreateSegmentController.php # app/Http/Controllers/Segments/DeleteSegmentController.php # routes/announcement.php # routes/api.php # routes/segment.php # routes/web.php
28 lines
721 B
PHP
28 lines
721 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Classes\Modules\Segments\Services\ConvertsConstantDetailsToResource;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class ConstantResource extends JsonResource
|
|
{
|
|
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->name,
|
|
'reference' => $this->reference,
|
|
'detail' => (App()->make(ConvertsConstantDetailsToResource::class))->execute($this->resource)
|
|
];
|
|
}
|
|
}
|