0

The project split into two part which is admin panel(localhost:8080) and front end(localhost:8000), both also use the same database, all the image store as a url in database example: product_id/image.png

With the env variable I can only access the image inside the public folder(project_name/public), but all the images are store outside the public folder(project_name/storage/app/public), So how can I access the image outside the public folder?

@foreach ($results as $product)
<img src="{{ env('ADMIN_PATH') }}{{ $product->img_url }}">
@endforeach
vbnewbie
  • 206
  • 6
  • 26

1 Answers1

0

You need to specify another variable with desired url in env file and call that variable in image tag

Geomi George
  • 51
  • 1
  • 4