|
2
|
1 <?php
|
|
|
2
|
|
|
3 namespace Wizard\Framework;
|
|
|
4
|
|
|
5 use Illuminate\Support\ServiceProvider;
|
|
|
6
|
|
|
7 class FrameworkServiceProvider extends ServiceProvider {
|
|
|
8 public function register():void
|
|
|
9 {
|
|
|
10 $this->app->bind('db.schema', fn () => \Libraries\MySchema::customizedSchemaBuilder());
|
|
|
11 }
|
|
|
12
|
|
|
13 public function boot(): void {
|
|
|
14 $publish_path = __DIR__.'/../publishable';
|
|
|
15 $this->publishes([
|
|
|
16 $publish_path.'/resources/views/components' => resource_path('views/components'),
|
|
|
17 $publish_path.'/vite.config.js' => base_path(),
|
|
|
18 ]);
|
|
|
19
|
|
|
20 foreach (glob(base_path('routes/resources/*.php')) as $routeFile) {
|
|
|
21 $this->loadRoutesFrom($routeFile);
|
|
|
22 }
|
|
|
23
|
|
|
24 }
|
|
|
25 }
|