1234567891011121314151617181920212223 |
- <?php
- namespace App\Repositories\Transformers\Base;
- use App\Repositories\Models\Base\Auth;
- use League\Fractal\TransformerAbstract;
- class AuthTransformer extends TransformerAbstract
- {
- /**
- * Prepare data to present.
- *
- * @param Auth $auth
- * @return array
- */
- public function transform(Auth $auth)
- {
- return [
- 'id' => $auth->id,
- 'created_at' => $auth->created_at ? $auth->created_at->format('Y-m-d H:i:s') : null,
- ];
- }
- }
|