initial: bootstrap from BukidBountyApp base
This commit is contained in:
33
app/Providers/AppServiceProvider.php
Normal file
33
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Http\Controllers\Support\Inertia;
|
||||
use Hypervel\Support\Facades\Auth;
|
||||
use Hypervel\Support\Facades\URL;
|
||||
use Hypervel\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot(): void
|
||||
{
|
||||
Auth::viaRequest('bearer', function ($request) {
|
||||
return \App\Auth\BearerTokenResolver::resolve($request);
|
||||
});
|
||||
}
|
||||
|
||||
public function register(): void
|
||||
{
|
||||
}
|
||||
function vite_asset(string $entry): string
|
||||
{
|
||||
static $manifest = null;
|
||||
if ($manifest === null) {
|
||||
$manifestPath = public_path('build/manifest.json');
|
||||
$manifest = file_exists($manifestPath) ? json_decode(file_get_contents($manifestPath), true) : [];
|
||||
}
|
||||
return '/build/' . ($manifest[$entry]['file'] ?? $entry);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user