I am using php artisan serve to serve on local host http://127.0.0.1:8000 , then files I upload surely exist in storage folder but when I am creating links like:
public function getFeaturedImageLinkAttribute()
{
$file = $this->getFirstMedia('featured_image');
if (! $file) {
return null;
}
return '<a href="' . $file->getUrl() . '" target="_blank">' . $file->file_name . '</a>';
}
links I get is like : http://127.0.0.1/storage/6/image.jpg
which is not woking but when I do : http://127.0.0.1:8000/storage/6/image.jpg it works so my question is how to make my links work?
.env file:
APP_URL=http://127.0.0.12:8000
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire