123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Transformers;
- use League\Fractal\TransformerAbstract;
- use App\Models\Config;
- /**
- * Class ConfigTransformer.
- *
- * @package namespace App\Transformers;
- */
- class ConfigTransformer extends TransformerAbstract
- {
- /**
- * Transform the Config entity.
- *
- * @param \App\Models\Config $model
- *
- * @return array
- */
- public function transform(Config $model)
- {
- return [
- 'id' => (int) $model->id,
- /* place your other model properties here */
- 'created_at' => $model->created_at,
- 'updated_at' => $model->updated_at
- ];
- }
- }
|