Laravel6でLaravel-adminをinstallできないエラー
1分こちらの記事を参考にLaravel Adminをインストールしようとした。
ターミナル
$ composer require encore/laravel-admin
$ php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"
$ php artisan admin:install
入力したコマンドは上3つ。するとエラー発生。
ターミナル
mb-2:hoge mb12$ php artisan admin:install
Migrating: 2016_01_04_173148_create_admin_tables
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table `` (`id` int unsigned not null auto_increment primary key, `username` varchar(190) not null, `password` varchar(60) not null, `name` varchar(255) not null, `avatar` varchar(255) null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at /Users/mb12/php-workspace/hoge/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''")
/Users/mb12/php-workspace/hoge/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:63
2 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''")
/Users/mb12/php-workspace/hoge/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:61
Please use the argument -v to see more details.
どうやらキャッシュの問題のようで、
ターミナル
$ php artisan config:cache
を実行後に再びphp artisan admin:install
でうまく動作した。