Laravel-admin: Syntax error or access violation: 1103 Incorrect table name

Created on 20 Sep 2018  ·  9Comments  ·  Source: z-song/laravel-admin

  • Laravel Version: #.#.# Laravel Framework 5.6.38
  • PHP Version: PHP Version 7.1.9
  • Laravel-admin: #.#.# latest

Description:

D:xampphtdocslara-admin>php artisan admin:install

IlluminateDatabaseQueryException : SQLSTATE[42000]: Syntax error or access
violation: 1103 Incorrect table name '' (SQL: create table `(idint unsigne d not null auto_increment primary key,usernamevarchar(190) not null,passwo
rdvarchar(60) not null,namevarchar(255) not null,avatarvarchar(255) nu ll,remember_tokenvarchar(100) null,created_attimestamp null,updated_at
` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at D:xampphtdocslara-adminvendorlaravelframeworksrcIlluminateDatabase
Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll
format the error
661| // message to include the bindings with SQL, which will make th
is exception a
662| // lot more helpful to the developer instead of just the databa
se's errors.
663| catch (Exception $e) {

664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|

Steps To Reproduce:

php artisan admin:install

Most helpful comment

seems like config cache problem, just try "php artisan config:cache" to clear cache.

All 9 comments

Are you have a file config/admin.php ?

Are you have a file config/admin.php ?

Yes i've but showing same error

Are you have a file config/admin.php ?

yes i have config/admin.php.
the error shows that there may be table name missing in migration file but there is no issue like that.

Let me install new laravel admin and check it? @jusyjk @rdtandel

Everything is working
php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"

Copied Directory [/vendor/encore/laravel-admin/config] To [/config]
Copied Directory [/vendor/encore/laravel-admin/resources/lang] To [/resources/lang]
Copied Directory [/vendor/encore/laravel-admin/database/migrations] To [/database/migrations]
Copied Directory [/vendor/encore/laravel-admin/resources/assets] To [/public/vendor/laravel-admin]

php artisan admin:install

Migrating: 2016_01_04_173148_create_admin_tables
Migrated:  2016_01_04_173148_create_admin_tables
Admin directory was created: /app/Admin
HomeController file was created: /app/Admin/Controllers/HomeController.php
ExampleController file was created: /app/Admin/Controllers/ExampleController.php
Bootstrap file was created: /app/Admin/bootstrap.php
Routes file was created: /app/Admin/routes.php     

tried again from scratch. and now working fine for me.

seems like config cache problem, just try "php artisan config:cache" to clear cache.

Thank you @sunkeyfong , you were right. I had the same issue today on my laravel project and "php artisan config:cache" worked for me.

Thanks Guys " php artisan config:cache " worked for me as well. i don't usually ike Github solutions but , this has worked almost instantly.

Thanks Guys " php artisan config:cache " worked for me as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evans-kim picture evans-kim  ·  3Comments

piian picture piian  ·  3Comments

xiaalngf picture xiaalngf  ·  3Comments

cdhraesaemer picture cdhraesaemer  ·  3Comments

abufalbo picture abufalbo  ·  3Comments