2015-11-02 150 views
1

我已經克隆從GitHub存儲庫,但在管理路由收到錯誤,同樣的代碼是另一個開發機器上運行良好,我們倆都使用的是Window 8Laravel5:NotFoundHttpException在RouteCollection.php線161

我們使用Auth中間件驗證用戶的登錄,但是當我試圖訪問管理http://example.com/admin我收到此錯誤

NotFoundHttpException in RouteCollection.php line 161 

但前臺工作正常。我試過在終端,但同樣的問題之後

composer install 
php artisan clear--compiled 

執行以下命令我也檢查了註冊擊潰&它的顯示終端,通過使用命令

php artisan route:list 

enter image description here

這裏有my route.php

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


// Logging in and out 
get('/login', 'Auth\[email protected]'); 
post('/login', 'Auth\[email protected]'); 
get('/logout', 'Auth\[email protected]'); 

Route::group(['namespace' => 'Admin','prefix' => 'admin','middleware' => 'auth',], function() { 

    resource('/', 'AdminController'); 

    resource('/countries', 'CountryController'); 

}); 

.htaccess文件代碼

<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> 

回答

0

我已經修復了這個問題,在我的情況與.htaccess文件的問題,我在.htaccess文件&它開始爲我工作改變了的BaseURL。

0

我有同樣的問題,我剛剛重新啓動apache,它的工作,我在Windows上。

相關問題