I have hosted my Laravel project on Linux server under my custom directory and that project as htts://www.example.com/laravel-project. My laravel application is working fine, but if I try to access any file inside controller or inside route or any other directory I am able to access. Thought it returns a fatal error, how could I stop these directories been accessed from the public domain.i.e web browser
Error on accessing web.php using this URL (https://www.example.com/laravel-project/routes/web.php)
Fatal error: Uncaught Error: Class 'Illuminate\Support\Facades\Route' not found in /var/www/mysite/laravel-project/routes/web.php:20 Stack trace: #0 {main} thrown in /var/www/mysite/laravel-project/routes/web.php on line 20.
Kindly help me find a solution for this.
CodePudding user response: