Problem with accessing local symbolic link in storage

Posted 1 year ago by JanakaDombawela


I created my symbolic link with php artisan storage:link

I save my files in following function:

Storage::put( Carbon::now()->format( 'Y' ) . '/' . Carbon::now()->format( 'm' ), 'file.txt' );

My config/filesystems.php configurations:

'local' => [
            'driver' => 'local',
            'root' => storage_path('uploads'),
        'public' => [
            'driver' => 'local',
            'root' => storage_path('uploads'),
            'url' => env('APP_URL').'/storage',
            'visibility' => 'public',

The files are saved in the storage/uploads/2017/10 directory, which is what I want.

I access them as follows:


which outputs: http://localhost/mysite/public/storage/2017/10/file.txt and it gives 404.

When I try to enter http://localhost/mysite/public/storage it shows empty directory, not a 404.

Can you guys give any suggestions or ideas? Help is appreciated. Thanks.

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

Reply to

Use Markdown with GitHub-flavored code blocks.