Mikegk
5 months ago
406
3
Laravel

Confusion about the storage path

Posted 5 months ago by Mikegk

Hi guys,

I just used the Storage engine for the first time in my Laravel 6 project. After reading the documents, I created the symlinks using

	php artisan storage:link

But I do not really understand the behaviour: The Symlink is created between

	app_root/storage/public

and

	app_root/public/storage

that's what the "filesystems.php" says:

'links' => [
        public_path('storage') => storage_path('app/public'),
    ],
	

So we could expect placing a file in the storage folder, should make it visible for web users like so:

	https://appname.com/public/storage/some_file.jpg

right?

But it doesn't. Instead you can visit

	https://appname.com/storage/some_file.jpg

and get the image.

Why is that? Is this correct?

Please sign in or create an account to participate in this conversation.