错误一
第一次安装laravel-admin,根据官方文档执行
composer require encore/laravel-admin
结果就报错了:
The “https://packagist.org/packages.json” file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Temporary failu resolution
failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
The “http://packagist.org/p/encore/laravel-admin%249e7b10b6b4cf9a2b086da92fc76584db6525035b8af0a69e636cf6d4ee512c23.json” file coul
e downloaded: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
后面才发现是没有添加版本号Σ(  ̄д ̄;) !!!
正确安装方法(我使用的是Homestead 在ssh里进入项目目录):
> :~$ cd 到你的项目目录
> :~/code/project$ composer require encore/laravel-admin "1.6.*" #用composer安装laravel-admin
> :~/code/project$ php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider" #发布资源
> :~/code/project$ php artisan admin:install #安装laravel-admin并进行数据库迁移
错误二
Disk [admin] not configured, please add a disk config in
config/filesystems.php
.
在config/filesystems.php中添加:
'admin' => [
'driver' => 'local',
'root' => public_path('upload'),
'visibility' => 'public',
'url' => env('APP_URL').'/public/upload/',
],
如图:
作者:魂淡风轻
来源:CSDN
原文:https://blog.csdn.net/u011104399/article/details/80316666
版权声明:本文为博主原创文章,转载请附上博文链接!