安裝laravel-admin產生不了app\Admin文件問題


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="Encore\Admin\AdminServiceProvider"

執行完還是沒產生app\Admin這個目錄,有點慌,繼續

再config.php里加入

Encore\Admin\Providers\AdminServiceProvider

不出意外,報錯,沒有文件,刪掉不理,不慌

cmd:php artisan admin:install

執行安裝報錯:好歹也報錯,之前都沒報過


[Illuminate\Database\QueryException]
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.php\databases.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: \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


ok,看見這個我就知道,終於ok了.果然,對應的目錄文件產生了

瀏覽器輸入:http://www.laravel.com/admin
---------------------
作者:_YuanXin
來源:CSDN
原文:https://blog.csdn.net/qq_38802291/article/details/78398842
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM