In this migration:
Schema::create('user_closure', function(Blueprint $table)
{
$table->increments('closure_id');
$table->integer('ancestor', false, true);
$table->integer('descendant', false, true);
$table->integer('depth', false, true);
});
Can some one explain what does passing false, true mean to the integer filed ?
The API references the second parameter as the auto increment and is by default to false. The third being the unsigned parameter by default set to false either.
This migration is equivalent to :
Schema::create('user_closure', function(Blueprint $table) {
$table->increments('closure_id');
$table->integer('ancestor')->unsigned();
$table->integer('descendant')->unsigned();
$table->integer('depth')->unsigned();
});
Which is more readable imo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With