Skip to content

Commit 5e63381

Browse files
author
Sebastian Fix
committed
wip
1 parent 7fb83a4 commit 5e63381

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

app/Support/helpers.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Illuminate\Support\Facades\Vite;
34
use Illuminate\Support\Str;
45

56
if (! function_exists('localized_route')) {
@@ -11,3 +12,10 @@ function localized_route(string $name, mixed $parameters = [], bool $absolute =
1112
return route($localizedName, $parameters, $absolute);
1213
}
1314
}
15+
16+
if (! function_exists('csp_nonce')) {
17+
function csp_nonce(): string
18+
{
19+
return Vite::cspNonce() ?? '';
20+
}
21+
}

0 commit comments

Comments
 (0)