Init(Core): Change repo
This commit is contained in:
23
app/Http/Resources/ArtCollection.php
Normal file
23
app/Http/Resources/ArtCollection.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
|
||||
class ArtCollection extends ResourceCollection
|
||||
{
|
||||
/**
|
||||
* Transform the resource collection into an array.
|
||||
*
|
||||
* @return array<int|string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'text' => $this->text,
|
||||
'number' => $this->number,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user