Reputation: 161
public function up()
{
Schema::create('admins', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admins');
}
}
I have this code and it shows different data in phpmyadmin when i run PHP ARTISAN MIGRATE photo
Upvotes: 0
Views: 30
Reputation: 161
The solution for this: I have send a form to a server and it eventually have written all tables to database.
Upvotes: 0
Reputation: 19
Your given screen shot seems to be of 'migrations' table instead of 'admins' table. Please refresh and check in 'admins' table. Your migration code is correct and it should work fine.
Upvotes: 1
Reputation: 21
It would appear that your screenshot is of the migrations
table itself, rather than of the admins
table.
The migrations
table is used by Laravel to determine which (if any) migrations have been applied to your database. From there it can determine which migrations still need to be run.
I'd suggest that you refresh the page and then view the structure of the admins
table (PHPMyAdmin doesn't auto refresh).
Upvotes: 1