image validate in laravel validater
$this->validate($request, ['file' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',]);
image validate in laravel validater
$this->validate($request, ['file' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',]);
laravel upload image document validator
$document = $request->upload_file;
if ($document) {
$validate = Validator::make(
[
'extension' => strtolower($request->upload_file->getClientOriginalExtension()),
],
[
'extension' => 'in:jpg,jpeg,png,gif,pdf,csv,docx,xlsx,txt',
]
);
if ($validate->fails())
return redirect()->back()->withErrors($validator->errors());
$fileName = $document->getClientOriginalName();
$document->move('public/documents', $fileName);
$data['upload_file'] = $fileName;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us