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

LeTraceurSnorkLibrary / MessSaga / 24455793340

15 Apr 2026 12:57PM UTC coverage: 39.248% (+2.7%) from 36.562%
24455793340

Pull #20

github

web-flow
Merge 4e3783ced into 4ac78237e
Pull Request #20: feat: tariffs

161 of 280 new or added lines in 14 files covered. (57.5%)

2 existing lines in 2 files now uncovered.

741 of 1888 relevant lines covered (39.25%)

0.78 hits per line

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

77.78
/app/Http/Middleware/HandleInertiaRequests.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Http\Middleware;
6

7
use App\Models\User;
8
use App\Services\Quota\UserMediaQuotaService;
9
use Filament\Facades\Filament;
10
use Illuminate\Http\Request;
11
use Inertia\Middleware;
12

13
class HandleInertiaRequests extends Middleware
14
{
15
    /**
16
     * The root template that is loaded on the first page visit.
17
     *
18
     * @var string
19
     */
20
    protected $rootView = 'app';
21

22
    /**
23
     * Determine the current asset version.
24
     */
25
    public function version(Request $request): ?string
26
    {
27
        return parent::version($request);
×
28
    }
29

30
    /**
31
     * Define the props that are shared by default.
32
     *
33
     * @return array<string, mixed>
34
     */
35
    public function share(Request $request): array
36
    {
37
        $user  = $request->user();
2✔
38
        $quota = null;
2✔
39
        if ($user instanceof User && $user->exists) {
2✔
NEW
40
            $quota = app(UserMediaQuotaService::class)
×
NEW
41
                ->snapshot($user)
×
NEW
42
                ->toArray();
×
43
        }
44

45
        return [
2✔
46
            ...parent::share($request),
2✔
47
            'auth' => [
2✔
48
                'user'  => $user,
2✔
49
                'quota' => $quota,
2✔
50
            ],
2✔
51
            'filament' => [
2✔
52
                'adminPanelUrl' => $user instanceof User && $user->canAccessPanel(Filament::getPanel('admin'))
2✔
53
                    ? Filament::getPanel('admin')->getUrl()
1✔
54
                    : null,
55
            ],
2✔
56
        ];
2✔
57
    }
58
}
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