$imagePath = (request('image')->store('uploads', 'public'));
//dd($imagePath);
$image= Image::make(public_path("storage/{$imagePath}"))->fit(1000,1000);
$image->save();
auth()->user()->posts()->create([
'caption'=>$data['caption'],
'image'=>$imagePath,
]);
问问题
127 次