repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Controllers/Settings/AppearanceController.php | app/Http/Controllers/Settings/AppearanceController.php | <?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use Inertia\Inertia;
use Inertia\Response;
class AppearanceController extends Controller
{
public function __invoke(): Response
{
return Inertia::render('settings/Appearance');
}
}
| php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Controllers/Settings/DatabaseBackupController.php | app/Http/Controllers/Settings/DatabaseBackupController.php | <?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use App\Http\Requests\Settings\RestoreDatabaseRequest;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\DB;
use Inertia\Inertia;
use Inertia\Response;
use Symfony\Component\HttpFoundation\StreamedResponse;
class D... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Middleware/HandleInertiaRequests.php | app/Http/Middleware/HandleInertiaRequests.php | <?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Inspiring;
use Illuminate\Http\Request;
use Inertia\Middleware;
use Tighten\Ziggy\Ziggy;
class HandleInertiaRequests extends Middleware
{
/**
* The root template that's loaded on the first page visit.
*
* @see https://inertiajs.com/ser... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Middleware/CustomDomainMiddleware.php | app/Http/Middleware/CustomDomainMiddleware.php | <?php
namespace App\Http\Middleware;
use App\Models\StatusPage;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class CustomDomainMiddleware
{
/**
* Handle an incoming request.
*/
public function handle(Request $request, Closure $next): Response
{
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Middleware/HandleAppearance.php | app/Http/Middleware/HandleAppearance.php | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\View;
use Symfony\Component\HttpFoundation\Response;
class HandleAppearance
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoun... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Resources/MonitorHistoryResource.php | app/Http/Resources/MonitorHistoryResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class MonitorHistoryResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Resources/MonitorResource.php | app/Http/Resources/MonitorResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class MonitorResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Resources/MonitorCollection.php | app/Http/Resources/MonitorCollection.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
class MonitorCollection extends ResourceCollection
{
/**
* Transform the resource collection into an array.
*
* @return array<int|string, mixed>
*/
public function toArr... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Resources/StatusPageCollection.php | app/Http/Resources/StatusPageCollection.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
class StatusPageCollection extends ResourceCollection
{
/**
* The resource that this resource collects.
*
* @var string
*/
public $collects = StatusPageResource::class;
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Http/Resources/StatusPageResource.php | app/Http/Resources/StatusPageResource.php | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class StatusPageResource extends JsonResource
{
/**
* The "data" wrapper that should be applied.
*
* @var string|null
*/
public static $wrap = null; // <--- TAMBAHKAN BARIS INI
/**
* Transform t... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Listeners/SendCustomMonitorNotification.php | app/Listeners/SendCustomMonitorNotification.php | <?php
namespace App\Listeners;
use App\Notifications\MonitorStatusChanged;
use Illuminate\Support\Facades\Log;
use Spatie\UptimeMonitor\Events\UptimeCheckFailed;
class SendCustomMonitorNotification
{
/**
* Create the event listener.
*/
public function __construct()
{
//
}
/**
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Listeners/DispatchConfirmationCheck.php | app/Listeners/DispatchConfirmationCheck.php | <?php
namespace App\Listeners;
use App\Jobs\ConfirmMonitorDowntimeJob;
use App\Services\SmartRetryService;
use Illuminate\Support\Facades\Log;
use Spatie\UptimeMonitor\Events\UptimeCheckFailed;
class DispatchConfirmationCheck
{
/**
* Handle the event.
*
* This listener intercepts UptimeCheckFailed... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Listeners/StoreMonitorCheckData.php | app/Listeners/StoreMonitorCheckData.php | <?php
namespace App\Listeners;
use App\Models\MonitorHistory;
use App\Models\MonitorIncident;
use App\Services\MonitorPerformanceService;
use Illuminate\Support\Facades\Log;
use Spatie\UptimeMonitor\Events\UptimeCheckFailed;
use Spatie\UptimeMonitor\Events\UptimeCheckRecovered;
use Spatie\UptimeMonitor\Events\UptimeC... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Listeners/BroadcastMonitorStatusChange.php | app/Listeners/BroadcastMonitorStatusChange.php | <?php
namespace App\Listeners;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Spatie\UptimeMonitor\Events\UptimeCheckFailed;
use Spatie\UptimeMonitor\Events\UptimeCheckRecovered;
class BroadcastMonitorStatusChange
{
/**
* Handle the event.
*
* Broadcasts monitor stat... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/SmartRetryAttempt.php | app/Services/SmartRetryAttempt.php | <?php
namespace App\Services;
class SmartRetryAttempt
{
public const TYPE_HTTP = 'http';
public const TYPE_TCP = 'tcp';
public const ERROR_TIMEOUT = 'timeout';
public const ERROR_CONNECTION_REFUSED = 'connection_refused';
public const ERROR_DNS = 'dns';
public const ERROR_SSL = 'ssl';
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/EmailRateLimitService.php | app/Services/EmailRateLimitService.php | <?php
namespace App\Services;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class EmailRateLimitService
{
private const DAILY_EMAIL_LIMIT = 10;
/**
* Check if the user can send an email notification
*/
public function canSendEmai... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/MonitorImportService.php | app/Services/MonitorImportService.php | <?php
namespace App\Services;
use App\Models\Monitor;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class MonitorImportService
{
private array $validationRules = [
'url' => ['required', 'url'],
'display_name' => ['nullable', 'string... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/TwitterRateLimitService.php | app/Services/TwitterRateLimitService.php | <?php
namespace App\Services;
use App\Models\NotificationChannel;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
class TwitterRateLimitService
{
private const RATE_LIMIT_PER_HOUR = 30;
private const RATE_LIMIT_PER_DAY = 200;
private const CACHE_TTL_HOURS ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/TelegramRateLimitService.php | app/Services/TelegramRateLimitService.php | <?php
namespace App\Services;
use App\Models\NotificationChannel;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
class TelegramRateLimitService
{
private const MAX_MESSAGES_PER_MINUTE = 20;
private const MAX_MESSAGES_PER_HOUR = 100;
private const CACHE_TT... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/MonitorPerformanceService.php | app/Services/MonitorPerformanceService.php | <?php
namespace App\Services;
use App\Models\MonitorHistory;
use App\Models\MonitorPerformanceHourly;
use Carbon\Carbon;
class MonitorPerformanceService
{
/**
* Update hourly performance metrics for a monitor.
*/
public function updateHourlyMetrics(int $monitorId, ?int $responseTime, bool $isSucces... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/MaintenanceWindowService.php | app/Services/MaintenanceWindowService.php | <?php
namespace App\Services;
use App\Models\Monitor;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class MaintenanceWindowService
{
/**
* Check if a monitor is currently in a maintenance window.
*/
public function isInMaintenance(Monitor $monitor): bool
{
// Quick check using ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/OgImageService.php | app/Services/OgImageService.php | <?php
namespace App\Services;
use App\Models\Monitor;
use App\Models\StatusPage;
use Intervention\Image\Drivers\Gd\Driver;
use Intervention\Image\ImageManager;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Typography\FontFactory;
class OgImageService
{
private ImageManager $manager;
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/InstanceIdService.php | app/Services/InstanceIdService.php | <?php
namespace App\Services;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class InstanceIdService
{
/**
* Get or create the anonymous instance ID.
*
* The ID is a one-way hash that cannot be reversed to identify
* the installation or its owner.
*/
public function... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/SmartRetryService.php | app/Services/SmartRetryService.php | <?php
namespace App\Services;
use App\Models\Monitor;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\TransferStats;
use Illuminate\Support\Facades\Log;
class SmartRetryService
{
public const SENSITIVITY_PRESETS = [
'low' => [
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/SmartRetryResult.php | app/Services/SmartRetryResult.php | <?php
namespace App\Services;
class SmartRetryResult
{
public function __construct(
public bool $success,
public array $attempts = [],
public ?string $message = null,
public ?int $statusCode = null,
public ?float $responseTime = null,
) {}
public function isSuccess... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/ServerResourceService.php | app/Services/ServerResourceService.php | <?php
namespace App\Services;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
class ServerResourceService
{
/**
* Get all server resource metrics.
*/
public function getMetrics(): array
{
return [
'cpu' => $this->getCpuUsage(),
'memory' =... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Services/TelemetryService.php | app/Services/TelemetryService.php | <?php
namespace App\Services;
use App\Models\Monitor;
use Illuminate\Support\Facades\DB;
class TelemetryService
{
public function __construct(
protected InstanceIdService $instanceIdService
) {}
/**
* Check if telemetry is enabled.
*/
public function isEnabled(): bool
{
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Notifications/MonitorStatusChanged.php | app/Notifications/MonitorStatusChanged.php | <?php
namespace App\Notifications;
use App\Services\EmailRateLimitService;
use App\Services\TelegramRateLimitService;
use App\Services\TwitterRateLimitService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Noti... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/CalculateMonitorStatistics.php | app/Console/Commands/CalculateMonitorStatistics.php | <?php
namespace App\Console\Commands;
use App\Models\Monitor;
use App\Models\MonitorHistory;
use App\Models\MonitorStatistic;
use Carbon\Carbon;
use Illuminate\Console\Command;
class CalculateMonitorStatistics extends Command
{
/**
* The name and signature of the console command.
*
* @var string
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/FastCleanupDuplicateHistories.php | app/Console/Commands/FastCleanupDuplicateHistories.php | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class FastCleanupDuplicateHistories extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'monitor:fast-cleanup-duplicates {-... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/RunCronlessSchedulerCommand.php | app/Console/Commands/RunCronlessSchedulerCommand.php | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class RunCronlessSchedulerCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'schedule:run-cronless-safe
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/CleanupDuplicateMonitorHistories.php | app/Console/Commands/CleanupDuplicateMonitorHistories.php | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class CleanupDuplicateMonitorHistories extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'monitor:cleanup-duplicates {--d... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/CheckDatabaseHealth.php | app/Console/Commands/CheckDatabaseHealth.php | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class CheckDatabaseHealth extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'db:healt... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/OptimizeSqliteDatabase.php | app/Console/Commands/OptimizeSqliteDatabase.php | <?php
namespace App\Console\Commands;
use App\Models\MonitorLog;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class OptimizeSqliteDatabase extends Command
{
/**
* The name and signature of the console command.
*/
protected $si... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/CalculateDailyUptimeCommand.php | app/Console/Commands/CalculateDailyUptimeCommand.php | <?php
namespace App\Console\Commands;
use App\Jobs\CalculateSingleMonitorUptimeJob;
use App\Models\Monitor;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class CalculateDailyUptimeCommand extends Command
{
/**
* The console command name.
*
* @var string
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/UpdateMaintenanceStatusCommand.php | app/Console/Commands/UpdateMaintenanceStatusCommand.php | <?php
namespace App\Console\Commands;
use App\Services\MaintenanceWindowService;
use Illuminate\Console\Command;
class UpdateMaintenanceStatusCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'monitor:update-maintenanc... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Console/Commands/GenerateSitemap.php | app/Console/Commands/GenerateSitemap.php | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Spatie\Sitemap\SitemapGenerator;
class GenerateSitemap extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $signature = 'sitemap:generate';
/**
* The console command description.... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/MonitorUptimeDaily.php | app/Models/MonitorUptimeDaily.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class MonitorUptimeDaily extends Model
{
use HasFactory;
protected $fillable = [
'monitor_id',
'date',
'uptime_percentage',
'avg_response_time',
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/SocialAccount.php | app/Models/SocialAccount.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SocialAccount extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<string>
*/
protected $fillable = [
'use... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/User.php | app/Models/User.php | <?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Noti... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/MonitorPerformanceHourly.php | app/Models/MonitorPerformanceHourly.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class MonitorPerformanceHourly extends Model
{
use HasFactory;
protected $table = 'monitor_performance_hourly';
protected $fil... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/MonitorIncident.php | app/Models/MonitorIncident.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class MonitorIncident extends Model
{
use HasFactory;
protected $fillable = [
'monitor_id',
'type',
'starte... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/MonitorStatistic.php | app/Models/MonitorStatistic.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class MonitorStatistic extends Model
{
use HasFactory;
protected $fillable = [
'monitor_id',
'uptime_1h',
'... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/Monitor.php | app/Models/Monitor.php | <?php
namespace App\Models;
use App\Services\MaintenanceWindowService;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Support\Carbon;
use Spatie\Tags\HasTags;
use Spatie\UptimeMonitor\Models\Monitor as SpatieMonitor;
use Spatie\Url\Url;
class Monitor extends SpatieMonitor
{
use HasFactory,... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/UserMonitor.php | app/Models/UserMonitor.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\Pivot;
class UserMonitor extends Pivot
{
use HasFactory;
protected $table = 'user_monitor';
public $incrementing = true;
protected $fillable = [
'user_id',
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/StatusPageMonitor.php | app/Models/StatusPageMonitor.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class StatusPageMonitor extends Model
{
use HasFactory;
protected $table = 'status_page_monitor';
protected $fillable = [
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/StatusPage.php | app/Models/StatusPage.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Str;
class StatusPage extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'title',
'desc... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/TelemetryPing.php | app/Models/TelemetryPing.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TelemetryPing extends Model
{
protected $fillable = [
'instance_id',
'app_version',
'php_version',
'laravel_version',
'monitors_total',
'monitors_public',
'users_total',
'stat... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/NotificationChannel.php | app/Models/NotificationChannel.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NotificationChannel extends Model
{
use HasFactory;
protected $fillable = [
'user_id',
'type',
'destination',
'is_enabled',
'metadata',
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Models/MonitorHistory.php | app/Models/MonitorHistory.php | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Prunable;
class MonitorHistory extends Model
{
use HasFactory, Prunable;
protected $fillable = [
'monitor_id',
'uptime_status',
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Providers/TelescopeServiceProvider.php | app/Providers/TelescopeServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\Telescope;
use Laravel\Telescope\TelescopeApplicationServiceProvider;
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
{
/**
* Register any application ser... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Providers/HorizonServiceProvider.php | app/Providers/HorizonServiceProvider.php | <?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Laravel\Horizon\Horizon;
use Laravel\Horizon\HorizonApplicationServiceProvider;
class HorizonServiceProvider extends HorizonApplicationServiceProvider
{
/**
* Bootstrap any application services.
*/
public function boot(): void
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Providers/AppServiceProvider.php | app/Providers/AppServiceProvider.php | <?php
namespace App\Providers;
use App\Listeners\BroadcastMonitorStatusChange;
use App\Listeners\DispatchConfirmationCheck;
use App\Listeners\SendCustomMonitorNotification;
use App\Listeners\StoreMonitorCheckData;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Fac... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Providers/AuthServiceProvider.php | app/Providers/AuthServiceProvider.php | <?php
namespace App\Providers;
use App\Models\Monitor;
use App\Models\StatusPage;
use App\Models\User;
use App\Policies\MonitorPolicy;
use App\Policies\StatusPagePolicy;
use App\Policies\UserPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Policies/UserPolicy.php | app/Policies/UserPolicy.php | <?php
namespace App\Policies;
use App\Models\User;
class UserPolicy
{
/**
* Grant all abilities to admin users.
*/
public function before(User $user, $ability)
{
return $user->is_admin ? true : null;
}
public function viewAny(User $user)
{
return false;
}
p... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Policies/StatusPagePolicy.php | app/Policies/StatusPagePolicy.php | <?php
namespace App\Policies;
use App\Models\StatusPage;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class StatusPagePolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
ret... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/app/Policies/MonitorPolicy.php | app/Policies/MonitorPolicy.php | <?php
namespace App\Policies;
use App\Models\Monitor;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class MonitorPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return tr... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/bootstrap/app.php | bootstrap/app.php | <?php
use App\Http\Middleware\CustomDomainMiddleware;
use App\Http\Middleware\HandleAppearance;
use App\Http\Middleware\HandleInertiaRequests;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Middleware\Ad... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/bootstrap/providers.php | bootstrap/providers.php | <?php
return [
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\HorizonServiceProvider::class,
App\Providers\TelescopeServiceProvider::class,
];
| php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Pest.php | tests/Pest.php | <?php
/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Fra... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/TestCase.php | tests/TestCase.php | <?php
namespace Tests;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use RefreshDatabase;
protected function setUp(): void
{
parent::setUp();
// Disable CSRF verification for ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/UserCrudTest.php | tests/Feature/UserCrudTest.php | <?php
use App\Models\Monitor;
use App\Models\NotificationChannel;
use App\Models\StatusPage;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\assertDatabaseMissing;
use function Pest\Laravel\deleteJson;
use function Pest\Laravel\get;
use f... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/SubscribeMonitorControllerTest.php | tests/Feature/SubscribeMonitorControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\postJson;
describe('SubscribeMonitorController', function () {
beforeEach(function () {
$this->user = User::f... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/TelegramRateLimitTest.php | tests/Feature/TelegramRateLimitTest.php | <?php
use App\Models\NotificationChannel;
use App\Models\User;
use App\Services\TelegramRateLimitService;
use Carbon\Carbon;
use Illuminate\Support\Facades\Cache;
beforeEach(function () {
// Clear any existing cache
Cache::flush();
// Reset time to current time
Carbon::setTestNow();
});
afterEach(fun... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/TwitterNotificationTest.php | tests/Feature/TwitterNotificationTest.php | <?php
use App\Models\Monitor;
use App\Models\NotificationChannel;
use App\Models\User;
use App\Notifications\MonitorStatusChanged;
use App\Services\TwitterRateLimitService;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Notification;
use NotificationChannels\Twitter\TwitterChannel;
beforeEach(fu... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PrivateMonitorControllerTest.php | tests/Feature/PrivateMonitorControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;
describe('PrivateMonitorController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
$this->otherUser = User::factor... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/StatusPageCrudTest.php | tests/Feature/StatusPageCrudTest.php | <?php
use App\Models\Monitor;
use App\Models\StatusPage;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\assertDatabaseMissing;
use function Pest\Laravel\get;
use function Pest\Laravel\postJs... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/BookmarkTest.php | tests/Feature/BookmarkTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
it('can pin a monitor', function () {
$user = User::factory()->create();
$monitor = Monitor::factory()->create([
'is_public' => false,
'uptime_check_enabled' => true,
]);
// Attach user to monitor
$monitor->users()->attach($user->... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ToggleMonitorPinControllerTest.php | tests/Feature/ToggleMonitorPinControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\postJson;
describe('ToggleMonitorPinController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
$this->adm... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/TelemetryTest.php | tests/Feature/TelemetryTest.php | <?php
use App\Models\TelemetryPing;
use App\Models\User;
use App\Services\InstanceIdService;
use App\Services\TelemetryService;
beforeEach(function () {
// Clean up instance ID file before each test
$path = config('telemetry.instance_id_path');
if (file_exists($path)) {
unlink($path);
}
});
/... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PinnedMonitorControllerTest.php | tests/Feature/PinnedMonitorControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;
describe('PinnedMonitorController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
// Create monitors
$thi... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorListControllerTest.php | tests/Feature/MonitorListControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use Inertia\Testing\AssertableInertia as Assert;
beforeEach(function () {
$this->user = User::factory()->create();
$this->actingAs($this->user);
});
describe('MonitorListController', function () {
describe('index method with pinned type', function () {
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorStatusStreamControllerTest.php | tests/Feature/MonitorStatusStreamControllerTest.php | <?php
use Illuminate\Support\Facades\Cache;
use function Pest\Laravel\get;
describe('MonitorStatusStreamController', function () {
beforeEach(function () {
Cache::flush();
});
afterEach(function () {
Cache::flush();
});
it('returns SSE response with correct content type header',... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/SmartRetryServiceTest.php | tests/Feature/SmartRetryServiceTest.php | <?php
use App\Models\Monitor;
use App\Services\SmartRetryAttempt;
use App\Services\SmartRetryResult;
use App\Services\SmartRetryService;
beforeEach(function () {
$this->service = new SmartRetryService;
});
describe('SmartRetryService', function () {
describe('getPreset', function () {
it('returns low... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorPageViewsTest.php | tests/Feature/MonitorPageViewsTest.php | <?php
use App\Jobs\IncrementMonitorPageViewJob;
use App\Models\Monitor;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Queue;
use function Pest\Laravel\get;
beforeEach(function () {
// Create a public monitor for testing
$this->monitor = Monitor::factory()->create([
'url' => 'ht... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/BadgeControllerTest.php | tests/Feature/BadgeControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorStatistic;
use function Pest\Laravel\get;
describe('BadgeController', function () {
beforeEach(function () {
$this->publicMonitor = Monitor::factory()->create([
'is_public' => true,
'uptime_check_enabled' => true,
'ur... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ConfirmMonitorDowntimeJobTest.php | tests/Feature/ConfirmMonitorDowntimeJobTest.php | <?php
use App\Jobs\ConfirmMonitorDowntimeJob;
use App\Listeners\DispatchConfirmationCheck;
use App\Models\Monitor;
use App\Services\SmartRetryService;
use Carbon\Carbon;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Queue;
use Spatie\UptimeMonitor\Events\UptimeCheckFailed;
use Spatie\UptimeMonit... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/DashboardTest.php | tests/Feature/DashboardTest.php | <?php
use App\Models\User;
test('guests are not redirected to the login page', function () {
$response = $this->get('/dashboard');
// Check that the response does not redirect to the login page
$response->assertStatus(200);
});
test('authenticated users can visit the dashboard', function () {
$user ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/EmailRateLimitTest.php | tests/Feature/EmailRateLimitTest.php | <?php
use App\Models\User;
use App\Notifications\MonitorStatusChanged;
use App\Services\EmailRateLimitService;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Notification;
beforeEach(function () {
// Clean up any existing email logs
DB::table('email_notification_logs')->t... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorCrudTest.php | tests/Feature/MonitorCrudTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseCount;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\assertDatabaseMissing;
use function Pest\Laravel\get;
use function Pest\Laravel\postJson;
beforeEach(function ()... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/LatestHistoryControllerTest.php | tests/Feature/LatestHistoryControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;
describe('LatestHistoryController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
$this->admin = User::factory()->... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ServerResourceTest.php | tests/Feature/ServerResourceTest.php | <?php
use App\Models\User;
use App\Services\ServerResourceService;
test('server resources page requires authentication', function () {
$response = $this->get('/settings/server-resources');
$response->assertRedirect('/login');
});
test('non-admin user cannot access server resources page', function () {
$... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/UptimesDailyControllerTest.php | tests/Feature/UptimesDailyControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorUptimeDaily;
use App\Models\User;
use function Pest\Laravel\actingAs;
describe('UptimesDailyController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
$this->admin = User::factory()->create(['is_admin' => true])... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorAuthorizationTest.php | tests/Feature/MonitorAuthorizationTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use App\Policies\MonitorPolicy;
test('only user with is_admin true can update public monitors', function () {
// Create users
$adminUser = User::factory()->create(['id' => 1, 'is_admin' => 1]);
$regularUser = User::factory()->create(['id' => 2]);
// ... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/NotificationChannelCrudTest.php | tests/Feature/NotificationChannelCrudTest.php | <?php
use App\Models\NotificationChannel;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\assertDatabaseMissing;
use function Pest\Laravel\get;
use function Pest\Laravel\postJson;
beforeEach(function () {
$this->user = User::factory(... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/GlobalEnabledDisabledFilterTest.php | tests/Feature/GlobalEnabledDisabledFilterTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
test('statistics endpoint includes global enabled and disabled monitors count', function () {
$user = User::factory()->create();
$this->actingAs($user);
// Create globally enabled and disabled monitors
$enabledMonitor = Monitor::factory()->create([
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/StatisticMonitorControllerTest.php | tests/Feature/StatisticMonitorControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use function Pest\Laravel\get;
describe('StatisticMonitorController', function () {
beforeEach(function () {
// Create monitors with different statuses
$this->upMonitor = Monitor::factory()->create([
'is_public' => true,
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PublicServerStatsTest.php | tests/Feature/PublicServerStatsTest.php | <?php
use function Pest\Laravel\get;
describe('Public Server Stats API', function () {
it('returns server stats when enabled', function () {
config(['app.show_public_server_stats' => true]);
$response = get('/api/server-stats');
$response->assertOk()
->assertJsonStructure([
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PublicMonitorDailyChecksTest.php | tests/Feature/PublicMonitorDailyChecksTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
it('displays daily checks count for public monitors', function () {
// Create public monitors
$publicMonitor1 = Monitor::factory()->create(['is_public' => true]);
$publicMonitor2 = Monitor::factory()->create(['is_public' => true]);
$privateM... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PublicMonitorShowControllerTest.php | tests/Feature/PublicMonitorShowControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use function Pest\Laravel\get;
describe('PublicMonitorShowController', function () {
beforeEach(function () {
$this->publicMonitor = Monitor::factory()->create([
'is_public' => true,
'uptime_check_enabled' => true,
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ExternalLinkTest.php | tests/Feature/ExternalLinkTest.php | <?php
use function Pest\Laravel\get;
it('returns successful response for public monitors page', function () {
$response = get('/public-monitors');
$response->assertSuccessful();
});
it('returns JSON data for public monitors', function () {
$response = get('/public-monitors');
$response->assertSucce... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorImportTest.php | tests/Feature/MonitorImportTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use App\Services\MonitorImportService;
use Illuminate\Http\UploadedFile;
beforeEach(function () {
$this->user = User::factory()->create(['email_verified_at' => now()]);
});
// ==========================================
// Authentication Tests
// ================... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/UnsubscribeMonitorTest.php | tests/Feature/UnsubscribeMonitorTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use Illuminate\Support\Facades\Cache;
// No global beforeEach - create users per test to avoid constraint violations
function testSuccessfulUnsubscription()
{
describe('successful unsubscription', function () {
it('successfully unsubscribes user from pub... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/PublicMonitorControllerTest.php | tests/Feature/PublicMonitorControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\MonitorHistory;
use App\Models\MonitorUptimeDaily;
use function Pest\Laravel\get;
describe('PublicMonitorController', function () {
beforeEach(function () {
$this->publicMonitor = Monitor::factory()->create([
'is_public' => true,
'uptim... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MaintenanceWindowServiceTest.php | tests/Feature/MaintenanceWindowServiceTest.php | <?php
use App\Models\Monitor;
use App\Services\MaintenanceWindowService;
use Carbon\Carbon;
beforeEach(function () {
$this->service = new MaintenanceWindowService;
});
it('detects monitor in one-time maintenance window', function () {
Carbon::setTestNow('2025-12-15 03:00:00');
$monitor = Monitor::factor... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/TagControllerTest.php | tests/Feature/TagControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;
describe('TagController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
// Create monitors with various tags
$monitor1 = Monitor::factor... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/MonitorTagTest.php | tests/Feature/MonitorTagTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
test('monitor can have tags attached', function () {
$user = User::factory()->create();
$this->actingAs($user);
$monitor = Monitor::factory()->create([
'url' => 'https://example.com',
'uptime_check_enabled' => true,
]);
$monitor-... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ToggleMonitorActiveControllerTest.php | tests/Feature/ToggleMonitorActiveControllerTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\assertDatabaseHas;
use function Pest\Laravel\post;
describe('ToggleMonitorActiveController', function () {
beforeEach(function () {
$this->user = User::factory()->create();
$this->admi... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/DisabledMonitorFilterTest.php | tests/Feature/DisabledMonitorFilterTest.php | <?php
use App\Models\Monitor;
use App\Models\User;
test('statistics endpoint includes disabled monitors count', function () {
$user = User::factory()->create();
$this->actingAs($user);
// Create a monitor and disable it for the user (user-specific disabled)
$monitor = Monitor::factory()->create([
... | php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
syofyanzuhad/uptime-kita | https://github.com/syofyanzuhad/uptime-kita/blob/d60b7c16c3cc55d022da9562da63f4f6d29a4588/tests/Feature/ExampleTest.php | tests/Feature/ExampleTest.php | <?php
test('returns a successful response', function () {
$response = $this->get('/');
$response->assertStatus(200);
});
| php | Apache-2.0 | d60b7c16c3cc55d022da9562da63f4f6d29a4588 | 2026-01-05T04:47:43.726909Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.