为什么我得到了laravel NotFoundHttpException?

时间:2015-03-22 09:33:51

标签: php laravel-4

我已经成功克隆了一个从git repo到新文件夹的laravel,并且我已成功运行数据库迁移&种子。

我还删除了供应商文件夹,然后运行:$composer install --dev

虽然我的routes.php很简单:

<?php

Route::get('/', 'BlogController@getIndex');

我尝试访问我的页面:

http://localhost:8080/widgets-repository-contribution%20/public/

我收到此错误:

Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException

我也尝试重启服务器,但没有运气.. 有什么想法吗?

完整追踪:

Server/Request Data
REDIRECT_OPENSSL_CONF   C:\Bitnami\wampstack-5.4.37-0/apache2/conf/openssl.cnf
REDIRECT_PATH   C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\jZip;C:\HaxeToolkit\haxe\;C:\HaxeToolkit\neko;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Bitnami\wampstack-5.4.37-0\php;C:\ProgramData\ComposerSetup\bin;;C:\Bitnami\wampstack-5.4.37-0/apache2/bin;
REDIRECT_STATUS 200
OPENSSL_CONF    C:\Bitnami\wampstack-5.4.37-0/apache2/conf/openssl.cnf
PATH    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\jZip;C:\HaxeToolkit\haxe\;C:\HaxeToolkit\neko;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Bitnami\wampstack-5.4.37-0\php;C:\ProgramData\ComposerSetup\bin;;C:\Bitnami\wampstack-5.4.37-0/apache2/bin;
HTTP_HOST   localhost:8080
HTTP_CONNECTION keep-alive
HTTP_CACHE_CONTROL  max-age=0
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36
HTTP_ACCEPT_ENCODING    gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE    ar,en-US;q=0.8,en;q=0.6
HTTP_COOKIE laravel_session=eyJpdiI6Inp0ZnZOZDhIcFFKS2FBejZNeEthNlE9PSIsInZhbHVlIjoiVHlKUzI2bkFrZGhkS0lFRXdqMEMrUUNXRWNcL2JORnY5OVVmOHF1d0NrbXE4K21zMkVabFpNMXFyN0Vhb2U1ZXVMVmlDUUpHZUMzV0hYUzExUnVlVGVBPT0iLCJtYWMiOiI2YjMzZTlkMTNmNjhhNmVmNjY3NDYxYTEwZjYzNWNmNjY2N2RjYjE5NWEwODgzMzY1NTMzZjZjMjZkNzRmMTg5In0%3D
SystemRoot  C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR  C:\Windows
SERVER_SIGNATURE    
SERVER_SOFTWARE Apache
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 8080
REMOTE_ADDR ::1
DOCUMENT_ROOT   C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs
REQUEST_SCHEME  http
CONTEXT_PREFIX  
CONTEXT_DOCUMENT_ROOT   C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs
SERVER_ADMIN    admin@example.com
SCRIPT_FILENAME C:/Bitnami/wampstack-5.4.37-0/apache2/htdocs/widgets-repository-contribution/public/index.php
REMOTE_PORT 57801
REDIRECT_URL    /widgets-repository-contribution /public/
GATEWAY_INTERFACE   CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD  GET
QUERY_STRING    
REQUEST_URI /widgets-repository-contribution%20/public/
SCRIPT_NAME /widgets-repository-contribution/public/index.php
PHP_SELF    /widgets-repository-contribution/public/index.php
REQUEST_TIME_FLOAT  1427016178.277
REQUEST_TIME    1427016178

1 个答案:

答案 0 :(得分:0)

&#34;公共&#34;不是url的一部分,url中的空格(%20)也很奇怪。您必须访问http://localhost:8080/widgets-repository-contribution

php artisan route:list将显示已为双重检查正确定义的所有路线。