I upload a post and the image is not being visualized
Im uploading posts that are images and they are being stored in my storage folder but they are not being visualized in my browser. It appears as if there is a post but the image is not being showed.
I already have a storage:link.
This is my store function in my PostsController:
public function store (Request $req) {
$rules = [
"image" => "required|image",
"description" => "string",
"user_id" => "integer"
];
$this->validate($req, $rules);
$post = New Post();
$post->image = $req->file('image')->store('/');
$post->description = $req->description;
$post->user_id = $req->user()->id;
$post->save();
return redirect("/post/" . $post->id);
}
@vincent15000 yes i did.
$ php artisan storage:link
The [C:\Users\Mateo\OneDrive\Desktop\Proyectos\MyFuture\MyFuture\public\storage]
link already exists.
The links have been created.
Still doesn´t work. I´ve been trying running storage:link all day