<?php

declare(strict_types=1);

use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Route;

Route::get('/clean', function (): void {
    Artisan::call('cache:clear');
    Artisan::call('view:clear');
    Artisan::call('route:clear');
    Artisan::call('config:cache');
});

Route::get('/rollback', function (): void {
    Artisan::call('migrate:rollback');
});

Route::get('/migrate', function (): void {
    Artisan::call('migrate');
});

Route::get('/seed', function (): void {
    Artisan::call('db:seed');
});

Route::get('/cache', function (): void {
    Cache::flush();
});
