ErrorPushService.php 436 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Services;
  3. use App\ErrorTemp;
  4. use App\Interfaces\ErrorPush;
  5. class ErrorPushService implements ErrorPush
  6. {
  7. public function push(string $path, string $title, string $content): bool
  8. {
  9. ErrorTemp::query()->create([
  10. "position" => $path,
  11. "title" => $title,
  12. "content" => $content,
  13. "created_at" => date("Y-m-d H:i:s")
  14. ]);
  15. return true;
  16. }
  17. }