Assets files not read in the uploaded Laravel project

50 Views Asked by At

Everything has been connected, but the problem is in the page formatting and the style is not loaded or read, why, what is the problem, is it in La Ravel or is it missing a definition that I did not do, I wish for help The site link for those who like to see it https://chance-3-620ac52b9ddc.herokuapp.com/

I expect that he is reading all the files as long as their path is correct at the time of design

1

There are 1 best solutions below

5
Othmane Nemli On BEST ANSWER

You have many options

  • Force Https using Laravel

Add to (AppServiceProvider::boot())

if($this->app->isProduction()) {
    \URL::forceScheme('https');
}
  • Update nginx default config (I don't think so you can do in Heroku)
RewriteCond %{SERVER_PORT} ^443$
RewriteRule (.*) http://www.example.com/$1
  • Update .env (easy one):
APP_URL=https://chance-3-620ac52b9ddc.herokuapp.com
ASSET_URL=https://chance-3-620ac52b9ddc.herokuapp.com