Last active
September 23, 2022 03:52
-
-
Save wilsenhc/f40dad2245449714983bb304bf725d3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title inertia>{{ config('app.name', 'Laravel') }}</title> | |
<!-- Scripts --> | |
@routes | |
{{ App\Facades\GlobalVite::withEntryPoints(['resources/js/app.ts']) }} | |
@inertiaHead | |
</head> | |
<body class="antialiased"> | |
@inertia | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Facades; | |
use Illuminate\Support\Facades\Facade; | |
/** | |
* Global Vite Facade | |
* | |
* @method static string useCspNonce(?string $nonce = null) | |
* @method static string|null cspNonce() | |
* @method static string asset(string $asset, string|null $buildDirectory) | |
* @method static string hotFile() | |
* @method static \App\Helpers\GlobalVite useBuildDirectory(string $path) | |
* @method static \App\Helpers\GlobalVite useHotFile(string $path) | |
* @method static \App\Helpers\GlobalVite useIntegrityKey(string|false $key) | |
* @method static \App\Helpers\GlobalVite useScriptTagAttributes(callable|array $callback) | |
* @method static \App\Helpers\GlobalVite useStyleTagAttributes(callable|array $callback) | |
* @method static \App\Helpers\GlobalVite withEntryPoints(array $entryPoints) | |
* | |
* @see \App\Helpers\GlobalViteHelper | |
*/ | |
class GlobalViteFacade extends Facade | |
{ | |
/** | |
* Get the registered name of the component. | |
* | |
* @return string | |
*/ | |
protected static function getFacadeAccessor() | |
{ | |
return \App\Helpers\GlobalViteHelper::class; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Helpers; | |
use Illuminate\Foundation\Vite; | |
class GlobalViteHelper extends Vite | |
{ | |
/** | |
* Generate an asset path for the application. | |
* | |
* @param string $path | |
* @param bool|null $secure | |
* @return string | |
*/ | |
protected function assetPath($path, $secure = null) | |
{ | |
return global_asset($path); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment