25 lines
530 B
PHP
25 lines
530 B
PHP
<?php
|
|
|
|
namespace App\Transformers;
|
|
|
|
use App\Models\Questionchoice as Model;
|
|
use League\Fractal\TransformerAbstract;
|
|
|
|
class QuestionchoiceTransformer extends TransformerAbstract
|
|
{
|
|
/**
|
|
* @param Model $model
|
|
* @return array
|
|
*/
|
|
public function transform(Model $model)
|
|
{
|
|
return [
|
|
'id' => $model->id,
|
|
'number' => $model->number,
|
|
'text' => $model->text,
|
|
'fillable' => $model->fillable,
|
|
'description' => $model->description
|
|
];
|
|
}
|
|
}
|