我已經克隆從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
這裏有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>