You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
793 B

5 years ago
5 years ago
  1. <?php
  2. namespace App\Service\v3\Implementations;
  3. use App\Model\v3\Store;
  4. use \App\Service\v3\Interfaces\BusinessHoursServiceInterface;
  5. class BusinessHoursService implements BusinessHoursServiceInterface
  6. {
  7. public function do($storeId,$isRest,$time1,$time2,$time3 = '',$time4 = '')
  8. {
  9. $store = Store::query()->find($storeId);
  10. $store->is_rest = $isRest;
  11. $store->time1 = $time1;
  12. $store->time2 = $time2;
  13. $store->time3 = $time3;
  14. $store->time4 = $time4;
  15. return $store->save();
  16. }
  17. public function check($storeId)
  18. {
  19. $res = Store::query()->select('is_rest','time1','time2','time3','time4')->find($storeId);
  20. return $res;
  21. }
  22. public function undo()
  23. {
  24. // TODO: Implement undo() method.
  25. }
  26. }