Laravel安装laravel-admin报错

错误一

第一次安装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/',
        ],

如图:
Disk [admin] not configured, please add a disk config in


作者:魂淡风轻
来源:CSDN
原文:https://blog.csdn.net/u011104399/article/details/80316666
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值