initial: bootstrap from BukidBountyApp base

This commit is contained in:
Jonathan Sykes
2026-06-06 18:43:00 +08:00
commit eb4a5731fb
5674 changed files with 160857 additions and 0 deletions

View 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);
}
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use Hypervel\Support\Facades\Broadcast;
use Hypervel\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}

View File

@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use Hypervel\Foundation\Support\Providers\EventServiceProvider as BaseServiceProvider;
class EventServiceProvider extends BaseServiceProvider
{
/**
* The event listener mappings for the application.
*/
protected array $listen = [
\App\Events\DemoEvent::class => [
\App\Listeners\DemoListener::class,
],
];
}

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use Hypervel\Foundation\Support\Providers\RouteServiceProvider as BaseServiceProvider;
use Hypervel\Support\Facades\Route;
class RouteServiceProvider extends BaseServiceProvider
{
/**
* The route files for the application.
*/
protected array $routes = [
];
public function boot(): void
{
parent::boot();
Route::group(
'/api',
base_path('routes/api.php'),
['middleware' => 'api']
);
Route::group(
'/',
base_path('routes/web.php'),
['middleware' => 'web']
);
// Route::middleware('web')
// ->prefix('Store')
// ->name('store.')
// ->group(base_path('routes/store.php'));
}
}