diff options
Diffstat (limited to 'app/Http/Controllers/ImageController.php')
-rw-r--r-- | app/Http/Controllers/ImageController.php | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/app/Http/Controllers/ImageController.php b/app/Http/Controllers/ImageController.php index 37874f5..603008d 100644 --- a/app/Http/Controllers/ImageController.php +++ b/app/Http/Controllers/ImageController.php @@ -12,17 +12,6 @@ class ImageController extends Controller { $usersAvatar = User::findOrFail($user_id)->avatar; $storagePath = storage_path('app/public/avatars/' . $usersAvatar); - return Image::make($storagePath)->resize(100, 100)->response(); - - // $request->validate([ - // 'avatar' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', - // ]); - // $user = Auth::user(); - // $avatarName = $user->id . '_avatar_' . time() . '.' . request()->avatar->getClientOriginalExtension(); - // $request->avatar->storeAs('avatars', $avatarName); - // $user->avatar = $avatarName; - // $user->save(); - // return back() - // ->with('success', 'You have successfully upload image.'); + return Image::make($storagePath)->response(); } } |