Answers for "how check is file in laravel"

3

check if file exists laravel

$file = public_path('storage/images/' . $value)

if(! file_exists($file)){
  return asset('storage/images/default.png');
}
Posted by: Guest on January-03-2021
1

How to validate a file type in laravel

'image' => 'required|mimes:jpeg'
  //or
'image' => 'required|image'
Posted by: Guest on March-09-2022

Code answers related to "how check is file in laravel"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language