app/Service/MigrationService.php
/**
     * Create table with specific columns,
     * second argument is 2d array with each element of array contains
     * information about on column.
     *
     * @param string $name
     * @param array $columns
     */
Create table with specific columns,
second argument is 2d array with each element of array contains
information about on column.

@param string $name
@param array $columns
Create table with specific columns second argument is 2d array with each element of array contains information about on column . @param string $name @param array $columns
public function createTableWithColumns(string $name, array $columns)
    {
        Schema::create($name, function (Blueprint $table) use ($columns) {
            $table->id();
            foreach ($columns as $column)
            {
                if($column['type'] == self::STRING_TYPE)
                    $table->string($column['name'])->nullable();
                elseif ($column['type'] == self::INT_TYPE)
                    $table->integer($column['name'])->nullable();
                elseif ($column['type'] == self::FLOAT_TYPE)
                    $table->float($column['name'])->nullable();
            }
        });
    }
public function createTableWithColumns ( string $ name , array $ columns ) { Schema :: create ( $ name , function ( Blueprint $ table ) use ( $ columns ) { $ table -> id ( ) ; foreach ( $ columns as $ column ) { if ( $ column [ 'type' ] == self :: STRING_TYPE ) $ table -> string ( $ column [ 'name' ] ) -> nullable ( ) ; elseif ( $ column [ 'type' ] == self :: INT_TYPE ) $ table -> integer ( $ column [ 'name' ] ) -> nullable ( ) ; elseif ( $ column [ 'type' ] == self :: FLOAT_TYPE ) $ table -> float ( $ column [ 'name' ] ) -> nullable ( ) ; } } ) ; }
Create table with specific columns,
 second argument is 2d array with each element of array contains
 information about on column.
Create table with specific columns second argument is 2d array with each element of array contains information about on column .