httpd.conf文件里我打开了这个,现在还不确定是否是这个问题 今天公司电脑安装,确定了,不是这行的问题,就是字段长度的问题
LoadModule rewrite_module modules/mod_rewrite.so
照样的,php7laravel5.5都下好了,开始安装laravel-admin
先是:composer require encore/laravel-admin "1.5.*"
完了就是:php artisan vendor:publish --provider="EncoreAdminAdminServiceProvider"
执行完还是没产生appAdmin这个目录,有点慌,继续
再config.php里加入
EncoreAdminProvidersAdminServiceProvider
不出意外,报错,没有文件,删掉不理,不慌
cmd:php artisan admin:install
执行安装报错:好歹也报错,之前都没报过
[IlluminateDatabaseQueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQ
L: alter table `users` add unique `users_email_unique`(`email`))
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
说是字段的问题,我把数据库配置文件config.phpdatabases.php
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => 'InnoDB',
改成这样,把已经存在的表users删除
再次cmd:php artisan admin:install
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table
Migrating: 2016_01_04_173148_create_admin_tables
Migrated: 2016_01_04_173148_create_admin_tables
Admin directory was created: appAdmin
HomeController file was created: appAdmin/Controllers/HomeController.php
ExampleController file was created: appAdmin/Controllers/ExampleController.php
Bootstrap file was created: appAdmin/bootstrap.php
Routes file was created: appAdmin/routes.php
ok,看见这个我就知道,终于ok了.果然,对应的目录文件产生了
浏览器输入:http://www.laravel.com/admin
---------------------
作者:_YuanXin
来源:CSDN
原文:https://blog.csdn.net/qq_38802291/article/details/78398842
版权声明:本文为博主原创文章,转载请附上博文链接!