Laravel : How to located public folder in Laravel?

Viewed 47

So I'm using this to save my images in the file fylesystems.php and it works, but now I want to deploy my project and 'root' => 'public/uploads' doesn't work. I know I'm doing something wrong but I don't know what, help please.

'uploads' => [
            'driver' => 'local',
            'root' => 'C:/Users/User/Desktop/Project/www/mycms/public/uploads'
        ],
1 Answers

You need to use public_path,

'root' => public_path('uploads/'),

After change make sure to do clear the caches.

php artisan config:cache
Related