0

我是 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()
    {
        //
    }
}
4

1 回答 1

0

新表名将是“users”,因为您在 Schema::create 函数中已将“users”作为名称。

phpmyadmin如果您使用的是数据库,您可以查看该表mysql,该数据库是 laravel 的默认数据库。

于 2016-04-29T20:40:10.577 回答