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.

30 lines
750 B

  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,$time1,$time2,$time3 = '',$time4 = '')
  8. {
  9. $store = Store::query()->find($storeId);
  10. $store->time1 = $time1;
  11. $store->time2 = $time2;
  12. $store->time3 = $time3;
  13. $store->time4 = $time4;
  14. return $store->save();
  15. }
  16. public function check($storeId)
  17. {
  18. $res = Store::query()->select('is_rest','time1','time2','time3','time4')->find($storeId);
  19. return $res;
  20. }
  21. public function undo()
  22. {
  23. // TODO: Implement undo() method.
  24. }
  25. }