jeudi 28 février 2019

laravel Asset() function break down after deployment

i had developed a laravel web app, which works fine and great on local machine after going online on a shared hosting server i have some issues displaying the logo and the website images using the asset() helper function, however the css and js are accessible and works fine (also using the asset function) i deployed the App following the steps bellow: 1- i created a directory called repositories outside the public_html (the root document of mydomain.com) and i copied inside it directory soukelafalah (contining all the files of my laravel project) 2- i moved the laravel public directory files into the public_html directory 3- i edited the index.php in public_html as follow :

require __DIR__.'./../repositories/SoukElfalah/vendor/autoload.php';

 $app = require_once__DIR__.'/../repositories/SoukElfalah/bootstrap/app.php';

4- i run php artisan storage:link and the link is succufully created 5- i had run also ln -s /home/dtruxpgw/repositories/SoukElfalah/storage/app/public /home/dtruxpgw/public_html/storage 6-the route and the css is working fine but the logo and the images are not displayed and shows a 404 error as shown in the image below
So please can any one point what i am missing? and when i put asset('/storage/images/thumbs/'.$img_name)}}" am i pointing to the storage directory in the public_html or in the one in the public folder of my laravel app directory Thank you in advance . enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire