view src/FrameworkServiceProvider.php @ 7:e6132a1e8e24 default tip

Adding better support for test among other base changes.
author Luka Sitas <sitas.luka.97@gmail.com>
date Thu, 25 Sep 2025 19:58:32 -0400
parents 84c75d9d90be
children
line wrap: on
line source

<?php

namespace Wizard\Framework;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Blade;
use \Wizard\Framework\Database\MySchema;

class FrameworkServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->bind('db.schema', fn () => MySchema::customizedSchemaBuilder());
    }

    public function boot(): void
    {
        $publish_path = __DIR__.'/../publishable';
        $this->publishes([
            $publish_path.'/resources' => resource_path(),
            $publish_path.'/vite.config.js' => base_path('vite.config.js'),
            $publish_path.'/package.json' => base_path('package.json'),
            $publish_path.'/stubs' => base_path('stubs'),
        ]);

        foreach (glob(base_path('routes/resources/*.php')) as $routeFile) {
            $this->loadRoutesFrom($routeFile);
        }

    }
}