我是laravel的新手,有人知道如何查看已创建的数据库表吗?我一直在使用模式构建器创建表之后迁移数据库并停留。这是我的代码
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('users', function($table)
{
$table->increments('id');
$table->string('nim');
$table->string('name');
$table->string('password');
$table->string('level');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
答案 0 :(得分:0)
新表名称将是“users”,因为您已在Schema :: create函数中指定了“users”作为名称。
如果您正在使用phpmyadmin
数据库,那么您可以从mysql
查看该表,该数据库被作为laravel的默认数据库。