add two more

This commit is contained in:
mcoder 2026-07-05 18:45:35 +03:30
parent 0f7ebc47be
commit df51e47b8f

View File

@ -7,6 +7,7 @@
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
class UserController extends Controller
{
@ -130,13 +131,16 @@ public function resetDatabase()
{
try {
Artisan::call('migrate:fresh', ['--force' => true]);
$this->setupLab();
if (Storage::disk('public')->exists('stolen_cookies.log')) {
Storage::disk('public')->delete('stolen_cookies.log');
}
return back();
} catch (\Exception $e) {
return response()->json([
'status' => 'error',
'message' => 'خطا در پاک‌سازی دیتابیس: ' . $e->getMessage()
'message' => 'خطا در پاک‌سازی دیتابیس و لاگ‌ها: ' . $e->getMessage()
], 500);
}
}