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

initial commit
author luka
date Thu, 23 Mar 2023 19:24:43 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/BlueprintExtensions/BlueprintExtensionServiceProvider.php	Thu Mar 23 19:24:43 2023 -0400
@@ -0,0 +1,27 @@
+<?php
+
+namespace Wizzard\Magicforger\BlueprintExtensions;
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Support\ServiceProvider;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Schema\Builder;
+use Wizzard\Magicforger\BlueprintExtensions\CustomBlueprint;
+
+class BlueprintExtensionServiceProvider extends ServiceProvider
+{
+    public function boot()
+    {
+
+				Builder::blueprintResolver(function ($table, $callback = null) {
+            return new CustomBlueprint($table, $callback);
+        });
+        // Alias CustomBlueprint as the default Blueprint
+        /* Blueprint::alias(CustomBlueprint::class); */
+    }
+
+    public function register()
+    {
+        // ...
+    }
+}