CustomerTransformable.php 416 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Shop\Customers\Transformations;
  3. use App\Shop\Customers\Customer;
  4. trait CustomerTransformable
  5. {
  6. protected function transformCustomer(Customer $customer)
  7. {
  8. $prop = new Customer;
  9. $prop->id = (int) $customer->id;
  10. $prop->name = $customer->name;
  11. $prop->email = $customer->email;
  12. $prop->status = (int) $customer->status;
  13. return $prop;
  14. }
  15. }