Проверьте, существует ли файл Laravel
$file = public_path('storage/images/' . $value)
if(! file_exists($file)){
return asset('storage/images/default.png');
}
Lokesh003
$file = public_path('storage/images/' . $value)
if(! file_exists($file)){
return asset('storage/images/default.png');
}
if (!file_exists('http://mysite.com/images/thumbnail_1286954822.jpg')) {
$filefound = '0';
}
$result = File::exists($myfile);
// From https://laravel-news.com/testing-file-uploads-with-laravel
Storage::disk('avatars')->assertExists('avatar.jpg');
@if(file_exists('favicon.ico'))
File exists
@else
Could not find file
@endif