comparison src/BlueprintExtensions/BlueprintExtensionServiceProvider.php @ 0:329123c41eaf

initial commit
author luka
date Thu, 23 Mar 2023 19:24:43 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:329123c41eaf
1 <?php
2
3 namespace Wizzard\Magicforger\BlueprintExtensions;
4
5 use Illuminate\Support\Facades\Schema;
6 use Illuminate\Support\ServiceProvider;
7 use Illuminate\Database\Schema\Blueprint;
8 use Illuminate\Database\Schema\Builder;
9 use Wizzard\Magicforger\BlueprintExtensions\CustomBlueprint;
10
11 class BlueprintExtensionServiceProvider extends ServiceProvider
12 {
13 public function boot()
14 {
15
16 Builder::blueprintResolver(function ($table, $callback = null) {
17 return new CustomBlueprint($table, $callback);
18 });
19 // Alias CustomBlueprint as the default Blueprint
20 /* Blueprint::alias(CustomBlueprint::class); */
21 }
22
23 public function register()
24 {
25 // ...
26 }
27 }