调整文章录入限制
This commit is contained in:
parent
c7a7130495
commit
7cfad29399
@ -57,7 +57,11 @@ class Upload extends BaseController
|
||||
$uploader = UploadService::create();
|
||||
if (!empty($images)) {
|
||||
foreach ($images as $k => $image) {
|
||||
$imageLink = $domain . $image;
|
||||
if (!preg_match('/^http/', $image)) {
|
||||
$imageLink = $domain . $image;
|
||||
} else {
|
||||
$imageLink = $image;
|
||||
}
|
||||
$stream = file_get_contents($imageLink);
|
||||
if (!$stream) {
|
||||
return app('json')->fail('图片获取出错');
|
||||
|
@ -21,7 +21,7 @@ class ArticleValidate extends Validate
|
||||
|
||||
protected $rule = [
|
||||
'cid|选择分类' => 'require|integer',
|
||||
'title|标题' => 'require|max:32',
|
||||
'title|标题' => 'require|max:50',
|
||||
'content|内容' => 'require',
|
||||
'author|作者' => 'require|max:32',
|
||||
'image_input|图片' => 'require|max:128',
|
||||
|
Loading…
x
Reference in New Issue
Block a user