getFullUrl method not working inside loops #2236
Unanswered
yrashmitha
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am developing API in laravel. When I try to fetch an uploaded image url inside a loop that gives me this error,
Spatie\MediaLibrary\Exceptions\UrlCannotBeDetermined: Storage path
myAppPath\storage\app
is not part of public pathmyAppPath\public
in file myAppPath\vendor\spatie\laravel-medialibrary\src\Exceptions\UrlCannotBeDetermined.php on line 11But when I try to get url directly it works.
like this ==>
$log = Log::find($id)->getMedia('images');
return $log[0]->getFullUrl();
this is my code. below code is not working
$logs = Log::where(function ($query) {
$query->where('owner', '=', Auth::user()->id)
->orWhere('owner', '=', Auth::user()->partner->id);
})
->orderBy('date', 'desc')
->get();
Any suggestion, please????
Beta Was this translation helpful? Give feedback.
All reactions