This commit is contained in:
ericko-cyber 2025-05-26 12:47:05 +07:00
parent 66b2b1ee39
commit d62fddc907
8 changed files with 13422 additions and 248 deletions

View File

@ -0,0 +1,21 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\RiwayatDiagnosa;
use Carbon\Carbon;
class DeleteOldRiwayat extends Command
{
protected $signature = 'riwayat:delete-old';
protected $description = 'Hapus riwayat diagnosa yang lebih dari 7 hari';
public function handle()
{
$cutoffDate = Carbon::now()->subDays(7);
$deleted = RiwayatDiagnosa::where('tanggal', '<', $cutoffDate)->delete();
$this->info("Berhasil menghapus {$deleted} data riwayat yang lebih dari 7 hari.");
}
}

21
app/Console/Kernel.php Normal file
View File

@ -0,0 +1,21 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule)
{
$schedule->command('riwayat:delete-old')->daily();
}
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

3110
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@
"concurrently": "^9.0.1",
"laravel-vite-plugin": "^1.2.0",
"postcss": "^8.4.47",
"purgecss": "^7.0.2",
"tailwindcss": "^3.4.13",
"vite": "^6.0.11"
}

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,6 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link rel="stylesheet" href="{{ asset('assets/css/history.css') }}">
<link rel="stylesheet" href="{{ asset('assets/css/homeadmin.css') }}">
<div class="main-banner wow fadeIn " id="diagnosa" data-wow-duration="1s" data-wow-delay="0.5s">

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button class="btn">Test Button</button>
<table class="table"><tr><td>Test</td></tr></table>
</body>
</html>