add two more
This commit is contained in:
parent
0f7ebc47be
commit
df51e47b8f
|
|
@ -7,6 +7,7 @@
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
class UserController extends Controller
|
class UserController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -130,13 +131,16 @@ public function resetDatabase()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Artisan::call('migrate:fresh', ['--force' => true]);
|
Artisan::call('migrate:fresh', ['--force' => true]);
|
||||||
|
|
||||||
$this->setupLab();
|
$this->setupLab();
|
||||||
|
if (Storage::disk('public')->exists('stolen_cookies.log')) {
|
||||||
|
Storage::disk('public')->delete('stolen_cookies.log');
|
||||||
|
}
|
||||||
|
|
||||||
return back();
|
return back();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => 'error',
|
'status' => 'error',
|
||||||
'message' => 'خطا در پاکسازی دیتابیس: ' . $e->getMessage()
|
'message' => 'خطا در پاکسازی دیتابیس و لاگها: ' . $e->getMessage()
|
||||||
], 500);
|
], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user