Home > Mobile >  Laravel site isn't working in live server
Laravel site isn't working in live server

Time:10-14

The root structure of my project as below:

enter image description here

The index.php

enter image description here

The line highlighted is the own throwing error: enter image description here

I'm lost on how to fix this. Apparently the autoloading isn't working but not sure how to fix as the path are correct. I also removed vendor folder and ran: composer install, composer update and then composer dump-autoload.

What else to do. My local is loading fine. Only live site. I also ran this:

php artisan cache:clear
php artisan config:clear
php artisan route:clear

php artisan config:cache
php artisan route:cache
php artisan optimize

CodePudding user response:

go to laravel/public directory and copy all the folder ,past outside the public folder. then change the path in index.php file. if your project on serve in the directory like public_html/laravel/ do this
require DIR.'/../laravel/vendor/autoload.php';$app = require_once DIR.'/../laravel/bootstrap/app.php'; if your project in public_html/ then require DIR.'/vendor/autoload.php';$app = require_once DIR.'/bootstrap/app.php';

  • Related