I write a function in my medium model to get the visibility of files and I did that that with accessors
my function :
public function getVisibilityAttribute()
{
return Storage::getVisibility(storage_path('app/' . $this->getOriginal('path')));
// the path comes from database and here is 'public/test/user.jpg'
}
after I fetch my data from database to show the files , I get this error :
exception: "League\Flysystem\FileNotFoundException"
file: "C:\xampp\htdocs\admin\vendor\league\flysystem\src\Filesystem.php"
line: 389
message: "File not found at path: C:/xampp/htdocs/admin/storage/app/public/test/user.jpg"
but the user.jpg exists at that path and i can access the image by browser .
so what should i do to solve this error?