view 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 source

<?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()
    {
        // ...
    }
}