5

I needed a migration in my project (laravel) to create some new tables, one of these tables must have a column with inet type, so I did this:

Schema::create('host_servers', static function (Blueprint $t) {
    //...
    $t->addColumn('inet', 'ip');
    //...
});

but when I run php artisan migrate it say:

BadMethodCallException : Method Illuminate\Database\Schema\Grammars\PostgresGrammar::typeInet does not exist.

Pejman
  • 2,442
  • 4
  • 34
  • 62

1 Answers1

3

Based on @Remul comment, the answer is ipAddress :

$t->ipAddress('column_name');
Pejman
  • 2,442
  • 4
  • 34
  • 62