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