上传图片时储存图片宽高

This commit is contained in:
Wisp X
2021-12-21 09:09:54 +08:00
parent 708d3e5137
commit 44d096c8ed
14 changed files with 375 additions and 1259 deletions
@@ -23,7 +23,7 @@ class ImageController extends Controller
$image->human_date = $image->created_at->diffForHumans();
$image->date = $image->created_at->format('Y-m-d H:i:s');
$image->append(['url', 'filename'])->setVisible([
'id', 'filename', 'url', 'human_date', 'date', 'human_date'
'id', 'filename', 'url', 'human_date', 'date', 'human_date', 'width', 'height'
]);
});
return $this->success('success', compact('images'));