Hy, I have a question about creating a table (usually working with a database) in laravel through migrations.
I have something like this (from happy code)
<?php Schema::create('users', function($table) { $table->increments('id'); $table->string('username', 32); $table->string('email', 320); $table->string('password', 64); $table->integer('role'); $table->boolean('active'); $table->timestamps(); });
OK, this will create user tables with 9 fields, but I get embarrassed by this callback. First of all, the variable "$ table" is an instance of which class? Can someone explain to me what happened here, respectively, how it works?
source share