first commit

This commit is contained in:
2025-11-06 06:55:15 +00:00
commit 0b603376d2
107 changed files with 17279 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Traits;
trait ApiResponseHelper
{
/*
* @param array|string $data
* @param string $message
* @param int $code
* @return \Illuminate\Http\JsonResponse
*/
protected function apiResponse(bool $status, string $message = null, $data = [], $code = 200)
{
return response()->json([
'status' => $status,
'message' => $message ?? '',
'data' => $data ?? ''
], $code);
}
}