update deploy
This commit is contained in:
29
app/Http/Resources/SettingResource.php
Normal file
29
app/Http/Resources/SettingResource.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/**
|
||||
* @mixin Setting
|
||||
*/
|
||||
class SettingResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'key' => $this->key,
|
||||
'value' => $this->value,
|
||||
'group' => $this->group?->value,
|
||||
'type' => $this->type?->value,
|
||||
'label' => $this->label,
|
||||
'order_index' => $this->order_index,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user