A version is required for an API group definition.
可能1:.env文件没有
127.0.0.1:8000/admin/127.0.0.1:8000/uploads/images/1.jpg
原因:.env设置APP_URL错误
错误:APP_URL=127.0.0.1:8000
正确:APP_URL=http://127.0.0.1:8000
$dataList = $paginator->transform(function ($item){
$data = $transformer->transformData($item);
return $data;
});
controller:
$form->multipleImage('images', '上传图片');
model:
public function getImagesAttribute($value){
$array = explode(',', $value);
return $array;
}
public function setImagesAttribute($value){
$this->attributes['images'] = implode(',', $value);
}
model中$fillable添加字段
[Composer\Downloader\TransportException]
The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: Peer certificate CN=`*.phphub.org' di
d not match expected CN=`packagist.laravel-china.org'
Failed to enable crypto
failed to open stream: operation failed
原因:composer 全局下载换成中国镜像.
解决:下载源换回默认。修改 composer 配置
composer config -g repo.packagist composer https://packagist.phpcomposer.com
mkdir cache
php artisan cache:clear
Hashids requires either theBC MathorGMPextension in order to work.
yum install php-bcmath
chown -R -v nginx:nginx /run/php-fpm/php-fpm.sock
1)php artisan cache:clear 2)chmod -R 777 storage
[Composer\Downloader\TransportException]
The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error mess
ages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
composer config repo.packagist composer https://packagist.phpcomposer.com
11.lavale换源
[Composer\Downloader\TransportException]
The "https://packagist.laravel-china.org/p/league/fractal%2415238fdcb46cea35d54e55c4b
3b27b4b96525d1f9909d9f01b69abff5ef0b57a.json" file could not be downloaded: SSL opera
tion failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。