remove codeigniter

This commit is contained in:
root
2026-06-04 02:41:08 -04:00
parent 4e33882ac7
commit b4e6ac03c5
180 changed files with 457 additions and 2186 deletions
+3 -10
View File
@@ -4,25 +4,18 @@ namespace App\Http\Controllers\Api;
use App\Http\Controllers\Api\BaseApiController;
use App\Models\Stats;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpFoundation\Response;
class StatsController extends BaseApiController
{
protected Stats $stats;
public function __construct()
{
parent::__construct();
$this->stats = model(Stats::class);
}
public function index()
{
try {
$stats = $this->stats->findAll();
$stats = Stats::query()->get()->toArray();
return $this->success($stats, 'Statistics retrieved successfully');
} catch (\Throwable $e) {
log_message('error', 'Stats retrieval error: ' . $e->getMessage());
Log::error('Stats retrieval error: '.$e->getMessage());
return $this->respondError('Failed to retrieve statistics', Response::HTTP_INTERNAL_SERVER_ERROR);
}
}