*** For laravel versions < 10 put this line $app->bind('path.public', function() { return __DIR__; }); just after this line $app = require_once __DIR__.'/../../{applicationname}/bootstrap/app.php'; ****For laravel version >= 10 add this line $app->usePublicPath(__DIR__); just after this line $app = require_once __DIR__.'/../../{applicationname}/bootstrap/app.php';