Laravel Blueprint group extension

1.1.0 2020-12-25 12:04 UTC


Sometimes, you want to group statements in your migration files. For example, when you want to add 3 new columns to a table and don't want to specify an ->after('...') on every statement. Now you can use the group method!


Lets take the following migration as example:

Schema::table('table', function (Blueprint $table) {


This can be grouped as follows:

Schema::table('table', function (Blueprint $table) {

	$table->group(function($group) {




Require this package with composer.

composer require eelcol/laravel-blueprint-group

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php