Created
February 11, 2019 12:27
-
-
Save pinoywebs123/5b887d7a9a6f111b3802f6fff4239a8f to your computer and use it in GitHub Desktop.
upload image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->validate($request, [ | |
'image'=> 'image|mimes:jpeg,jpg,png,gif|required|max:10000' | |
]); | |
$image = $request->file('image'); | |
$name = time().'.'.$image->getClientOriginalExtension(); | |
$destinationPath = public_path('/images'); | |
$image->move($destinationPath, $name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment