- add notes

This commit is contained in:
2023-08-07 01:30:38 +02:00
parent ffee3b257d
commit fcf422678c
13 changed files with 486 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace App\Http\Resources;
use App\Models\Note;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @property Note $resource
*/
class NoteResource extends JsonResource
{
public static $wrap = null;
public function toArray($request): array
{
return [
'id' => $this->resource->id,
'title' => $this->resource->title,
'note' => $this->resource->note,
];
}
}