Implement package limit notification system

This commit is contained in:
Codex Agent
2025-11-01 13:19:07 +01:00
parent 81cdee428e
commit 2c14493604
87 changed files with 4557 additions and 290 deletions

30
app/Support/ApiError.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
namespace App\Support;
use Illuminate\Http\JsonResponse;
class ApiError
{
public static function response(
string $code,
string $title,
string $message,
int $status,
array $meta = []
): JsonResponse {
$payload = [
'error' => [
'code' => $code,
'title' => $title,
'message' => $message,
],
];
if ($meta !== []) {
$payload['error']['meta'] = $meta;
}
return response()->json($payload, $status);
}
}