Please try:
php artisan route:clear
Laravel 5 added some route caching that can cause that headache, read more at http://laravel.com/docs/5.1/controllers#route-caching.
tkprocat said:
Please try:
php artisan route:clear
Laravel 5 added some route caching that can cause that headache, read more at http://laravel.com/docs/5.1/controllers#route-caching.
Ran
php artisan route:clear
results: issue persists.
astroanu said:
- check weather you have mod_rewrite enabled on apache.
Verified
admini@linux:/var/www/html$ a2enmod rewrite
Module rewrite already enable
- do you have the .htaccess on your public folder? if yes check if it matches to the correct version of apache you're using.
Not sure here is the default one provided.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
please note: I have also updated my apache2 config I have just reinstalled laravel on new vm I have also tired returning views instead of just text
Another test returning views
<?php
Route::get('/', function () {
return view('welcome');
});
Route::get('test', function () {
return view('test');
});
Issue still persists.
<VirtualHost *:80>
# The location of our projects public directory.
DocumentRoot /var/www/html/public
# Useful logs for debug.
CustomLog /var/www/html/access.log common
ErrorLog /var/www/html/error.log
# Rewrites for pretty URLs, better not to rely on .htaccess.
<Directory /www/var/html>
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
</Directory>
</VirtualHost>
Also my error log is empty But access log shows 404
admini@linux:/var/www/html$ cat error.log
admini@linux:/var/www/html$ cat access.log
192.168.1.130 - - [24/Jul/2015:15:51:53 -0700] "GET / HTTP/1.1" 200 1448
192.168.1.130 - - [24/Jul/2015:15:54:46 -0700] "GET /test HTTP/1.1" 404 496
192.168.1.130 - - [24/Jul/2015:15:56:37 -0700] "GET /test HTTP/1.1" 404 496
192.168.1.130 - - [24/Jul/2015:15:57:11 -0700] "GET /test HTTP/1.1" 404 496
192.168.1.130 - - [24/Jul/2015:15:57:13 -0700] "GET /test HTTP/1.1" 404 495
192.168.1.130 - - [24/Jul/2015:16:14:53 -0700] "GET /test HTTP/1.1" 404 496
192.168.1.130 - - [24/Jul/2015:16:14:53 -0700] "GET /test HTTP/1.1" 404 495
192.168.1.130 - - [24/Jul/2015:16:18:16 -0700] "GET /test HTTP/1.1" 404 496
192.168.1.130 - - [24/Jul/2015:16:18:17 -0700] "GET /test HTTP/1.1" 404 495
admini@linux:/var/www/html$
Here is my views folder
/var/www/html/resources/views/
├── errors
│ └── 503.blade.php
├── test.blade.php
├── vendor
└── welcome.blade.php
my "test" view is just a copy of the default welcome page. I can post the contents if anyone needs it
Changing my Apache config file to the below resolved the issue.
<VirtualHost *:80>
ServerName somehost
DocumentRoot /var/www/html/public
CustomLog /var/www/html/access.log common
ErrorLog /var/www/html/error.log
<Directory /var/www/html/public>
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
</Directory>
</VirtualHost>
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community