mirror of
https://github.com/anonaddy/anonaddy.git
synced 2025-12-28 07:55:07 +00:00
30 lines
892 B
PHP
30 lines
892 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class RuleResource extends JsonResource
|
|
{
|
|
public function toArray($request)
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'user_id' => $this->user_id,
|
|
'name' => $this->name,
|
|
'order' => $this->order,
|
|
'conditions' => $this->conditions,
|
|
'actions' => $this->actions,
|
|
'operator' => $this->operator,
|
|
'forwards' => $this->forwards,
|
|
'replies' => $this->replies,
|
|
'sends' => $this->sends,
|
|
'active' => $this->active,
|
|
'applied' => $this->applied,
|
|
'last_applied' => $this->last_applied?->toDateTimeString(),
|
|
'created_at' => $this->created_at->toDateTimeString(),
|
|
'updated_at' => $this->updated_at->toDateTimeString(),
|
|
];
|
|
}
|
|
}
|