1

I have uploaded my project to godaddy and moved public folder content to public_html. Project is working fine but Intervention image is unable to write in public path as it is not there. Below is the message:

Can't write image data to path (/home/username/public/uploads/...

So obviously public_path() is wrong, its still pointing public. But it should be public_html now. So my question is how can I change this to public_html in Laravel 5.2?

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
im_tsm
  • 1,965
  • 17
  • 29

1 Answers1

2

Try this in index.php:

$app = require_once __DIR__.'/../bootstrap/app.php';

// set the public path to this directory
$app->bind('path.public', function() {
    return __DIR__;
});
Geding
  • 324
  • 2
  • 11