Created API endpoints

This commit is contained in:
2017-12-20 16:45:20 +07:00
parent ad11643854
commit 554c74481b
53 changed files with 4637 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
<?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
];
}
}