我试图在我的数据库中创建通过laravel模式创建的数据库,但它们没有出现在PhpMyAdmin中。我在我的主目录中的站点中设置了phpMyAdmin。我使用localhost / ~myunsername / phpmyadmin访问php。
我在Laravel的app / config / database.php中连接数据库
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'firstapp',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
我正在使用架构
在routes.php中创建表Route::get('/', function()
{
Schema::create('art2', function($newtable)
{
$newtable->increments('id');
$newtable->string('artist');
$newtable->string('title',500);
$newtable->text('description');
$newtable->date('created');
$newtable->boolean('alumni');
$newtable->timestamps();
});
return View::make('hello');
});
当我尝试再次运行时,我收到此错误..
SQLSTATE [42S01]:基表或视图已存在:1050表' art2'已存在(SQL:create table art2
这就是说我已经创建了这些表,但它们并没有出现在PhpMyAdmin中。