Blame view

app/Transformers/Setting/Tax.php 640 Bytes
b7c7a5f6   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  <?php
  
  namespace App\Transformers\Setting;
  
  use App\Models\Setting\Tax as Model;
  use League\Fractal\TransformerAbstract;
  
  class Tax extends TransformerAbstract
  {
      /**
       * @param Model $model
       * @return array
       */
      public function transform(Model $model)
      {
          return [
              'id' => $model->id,
              'company_id' => $model->company_id,
              'name' => $model->name,
              'rate' => $model->rate,
              'enabled' => $model->enabled,
              'created_at' => $model->created_at->toIso8601String(),
              'updated_at' => $model->updated_at->toIso8601String(),
          ];
      }
  }