update project

This commit is contained in:
root
2026-05-30 01:11:35 -04:00
parent 3a0628ecc7
commit 2225f6bc72
9743 changed files with 1122482 additions and 59 deletions
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace App\Providers;
use App\Domain\SchoolCore\Context\SchoolContextFactory;
use App\Domain\SchoolCore\Context\SchoolContextResolver;
use App\Domain\SchoolCore\Context\SchoolContextStore;
use App\Domain\SchoolCore\Context\SchoolContextValidator;
use App\Http\Middleware\ResolveSchoolContext;
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Support\ServiceProvider;
final class SchoolContextServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->mergeConfigFrom(__DIR__ . '/../../config/school_context.php', 'school_context');
$this->app->singleton(SchoolContextStore::class);
$this->app->bind(SchoolContextFactory::class);
$this->app->bind(SchoolContextResolver::class);
$this->app->bind(SchoolContextValidator::class);
}
public function boot(Kernel $kernel): void
{
$this->publishes([
__DIR__ . '/../../config/school_context.php' => config_path('school_context.php'),
], 'school-context-config');
// Laravel 10/older: also register alias in app/Http/Kernel.php if preferred.
app('router')->aliasMiddleware('school.context', ResolveSchoolContext::class);
}
}