• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visavi / rotor / 28953145791

08 Jul 2026 03:06PM UTC coverage: 32.729% (+0.01%) from 32.717%
28953145791

push

github

visavi
Очистка кеша теперь  чистить все

0 of 1 new or added line in 1 file covered. (0.0%)

2 existing lines in 1 file now uncovered.

1859 of 5680 relevant lines covered (32.73%)

3.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/Http/Controllers/Admin/CacheController.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Http\Controllers\Admin;
6

7
use Illuminate\Http\RedirectResponse;
8
use Illuminate\Http\Request;
9
use Illuminate\Support\Facades\Artisan;
10
use Illuminate\View\View;
11

12
class CacheController extends AdminController
13
{
14
    /**
15
     * Главная страница
16
     */
17
    public function index(Request $request): View
×
18
    {
19
        $type = $request->input('type', 'files');
×
20

21
        $files = match ($type) {
×
22
            'views' => glob(storage_path('framework/views/*.php'), GLOB_BRACE),
×
23
            default => glob(storage_path('framework/cache/data/*/*/*')),
×
24
        };
×
25

26
        $files = paginate($files, 20, compact('type'));
×
27

28
        return view('admin/caches/index', compact('files', 'type'));
×
29
    }
30

31
    /**
32
     * Очистка кеша
33
     */
34
    public function clear(Request $request): RedirectResponse
×
35
    {
36
        $type = $request->input('type');
×
37

38
        if ($type === 'views') {
×
39
            Artisan::call('view:clear');
×
40
        } else {
NEW
41
            Artisan::call('optimize:clear');
×
42
        }
43

44
        setFlash('success', __('admin.caches.success_cleared'));
×
45

46
        return redirect('admin/caches?type=' . $type);
×
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc