src/Providers/FoundationServiceProvider.php
protected function bindBlueprintMacro(): void
    {
        Blueprint::macro('auditable', function () {
            $this->integer('created_by_id')->unsigned()->after('created_at')->nullable();
            $this->string('created_by_type')->after('created_at')->nullable();
            $this->integer('updated_by_id')->unsigned()->after('updated_at')->nullable();
            $this->string('updated_by_type')->after('updated_at')->nullable();
        });

        Blueprint::macro('dropAuditable', function () {
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_id']));
            $this->dropColumn(['updated_by_type', 'updated_by_id', 'created_by_type', 'created_by_id']);
        });

        Blueprint::macro('auditableAndTimestamps', function ($precision = 0) {
            $this->timestamp('created_at', $precision)->nullable();
            $this->integer('created_by_id')->unsigned()->nullable();
            $this->string('created_by_type')->nullable();
            $this->timestamp('updated_at', $precision)->nullable();
            $this->integer('updated_by_id')->unsigned()->nullable();
            $this->string('updated_by_type')->nullable();
        });

        Blueprint::macro('dropauditableAndTimestamps', function () {
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_at']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['created_at']));
            $this->dropColumn(['updated_by_type', 'updated_by_id', 'updated_at', 'created_by_type', 'created_by_id', 'created_at']);
        });
    }
protected function bindBlueprintMacro(): void
    {
        Blueprint::macro('auditable', function () {
            $this->integer('created_by_id')->unsigned()->after('created_at')->nullable();
            $this->string('created_by_type')->after('created_at')->nullable();
            $this->integer('updated_by_id')->unsigned()->after('updated_at')->nullable();
            $this->string('updated_by_type')->after('updated_at')->nullable();
        });

        Blueprint::macro('dropAuditable', function () {
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_id']));
            $this->dropColumn(['updated_by_type', 'updated_by_id', 'created_by_type', 'created_by_id']);
        });

        Blueprint::macro('auditableAndTimestamps', function ($precision = 0) {
            $this->timestamp('created_at', $precision)->nullable();
            $this->integer('created_by_id')->unsigned()->nullable();
            $this->string('created_by_type')->nullable();
            $this->timestamp('updated_at', $precision)->nullable();
            $this->integer('updated_by_id')->unsigned()->nullable();
            $this->string('updated_by_type')->nullable();
        });

        Blueprint::macro('dropauditableAndTimestamps', function () {
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['updated_at']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_type']));
            $this->dropForeign($this->createIndexName('foreign', ['created_by_id']));
            $this->dropForeign($this->createIndexName('foreign', ['created_at']));
            $this->dropColumn(['updated_by_type', 'updated_by_id', 'updated_at', 'created_by_type', 'created_by_id', 'created_at']);
        });
    }
protected function bindBlueprintMacro ( ) : void { Blueprint :: macro ( 'auditable' , function ( ) { $ this -> integer ( 'created_by_id' ) -> unsigned ( ) -> after ( 'created_at' ) -> nullable ( ) ; $ this -> string ( 'created_by_type' ) -> after ( 'created_at' ) -> nullable ( ) ; $ this -> integer ( 'updated_by_id' ) -> unsigned ( ) -> after ( 'updated_at' ) -> nullable ( ) ; $ this -> string ( 'updated_by_type' ) -> after ( 'updated_at' ) -> nullable ( ) ; } ) ; Blueprint :: macro ( 'dropAuditable' , function ( ) { $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'updated_by_type' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'updated_by_id' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'created_by_type' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'created_by_id' ] ) ) ; $ this -> dropColumn ( [ 'updated_by_type' , 'updated_by_id' , 'created_by_type' , 'created_by_id' ] ) ; } ) ; Blueprint :: macro ( 'auditableAndTimestamps' , function ( $ precision = 0 ) { $ this -> timestamp ( 'created_at' , $ precision ) -> nullable ( ) ; $ this -> integer ( 'created_by_id' ) -> unsigned ( ) -> nullable ( ) ; $ this -> string ( 'created_by_type' ) -> nullable ( ) ; $ this -> timestamp ( 'updated_at' , $ precision ) -> nullable ( ) ; $ this -> integer ( 'updated_by_id' ) -> unsigned ( ) -> nullable ( ) ; $ this -> string ( 'updated_by_type' ) -> nullable ( ) ; } ) ; Blueprint :: macro ( 'dropauditableAndTimestamps' , function ( ) { $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'updated_by_type' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'updated_by_id' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'updated_at' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'created_by_type' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'created_by_id' ] ) ) ; $ this -> dropForeign ( $ this -> createIndexName ( 'foreign' , [ 'created_at' ] ) ) ; $ this -> dropColumn ( [ 'updated_by_type' , 'updated_by_id' , 'updated_at' , 'created_by_type' , 'created_by_id' , 'created_at' ] ) ; } ) ; }
Bind blueprint macro.

@return void
Bind blueprint macro .