26 lines
569 B
PHP
26 lines
569 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Resources\Api\V1;
|
||
|
|
|
||
|
|
use App\Models\Lab;
|
||
|
|
use Illuminate\Http\Request;
|
||
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
|
||
|
|
/** @mixin Lab */
|
||
|
|
class LabResource extends JsonResource
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @return array<string, mixed>
|
||
|
|
*/
|
||
|
|
public function toArray(Request $request): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'identifiant' => $this->identifiant,
|
||
|
|
'titre' => $this->titre,
|
||
|
|
'niveau' => $this->niveau,
|
||
|
|
'duree_min' => $this->duree_min,
|
||
|
|
'competences' => $this->competences,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|