lundi 30 novembre 2015

Laravel routes are not working

I have this really weird issue where the routing process on Laravel seems to not work at all.. I get NotFoundHttpException every time I try to load another route except the default one(/)

These are my files:

routes.php

<?php

Route::get('/', function () {
    return view('welcome');
});

Route::get('/test', function () {
    return "WORKING?";
});

website apache config (myquotes.conf located in /etc/apache2/sites-available)

<VirtualHost *:80>
    ServerName my.qoutes
    ServerAlias www.my.quotes
    ServerAdmin admin@my.quotes
    DocumentRoot /var/www/myquotes/public/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

hosts rule

127.0.0.1   my.quotes

And php artisan route:list returns this

+--------+----------+------+------+---------+------------+
| Domain | Method   | URI  | Name | Action  | Middleware |
+--------+----------+------+------+---------+------------+
|        | GET|HEAD | /    |      | Closure |            |
|        | GET|HEAD | test |      | Closure |            |
+--------+----------+------+------+---------+------------+

So I don't really understand where the problem is. If I try to load /test I get the error, if I edit the function form /, nothing happens in the browser, the same view with Laravel 5 on it is shown. I have some other websites in /var/www, are those the problem or influencing it? The routes from the other websites are not working either. What should I do?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1QQmPSE
via IFTTT

Aucun commentaire:

Enregistrer un commentaire