Skip to content

Commit 64bb85e

Browse files
committed
style: migration as class
1 parent 1531dcd commit 64bb85e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

database/migrations/2017_04_29_093723_create_gateways_table.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Database\Migrations\Migration;
66

7-
class CreateGatewaysTable extends Migration
8-
{
7+
return new class () extends Migration {
98
/**
109
* Run the migrations.
1110
*
1211
* @return void
1312
*/
14-
public function up()
13+
public function up(): void
1514
{
1615
Schema::create('gateways', function (Blueprint $table) {
1716
$table->string('id', 32)->primary('id');
@@ -30,8 +29,8 @@ public function up()
3029
*
3130
* @return void
3231
*/
33-
public function down()
32+
public function down(): void
3433
{
3534
Schema::dropIfExists('gateways');
3635
}
37-
}
36+
};

0 commit comments

Comments
 (0)