首页 > 解决方案 > laravel 中的错误“找不到查看 [posts.create]。” 虽然它存在

问题描述

大家好,我正面临这个错误“未找到查看 [posts.create]。” 虽然它已经存在!

所以你觉得那是我那部分的路线代码

<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


/*
|--------------------------------------------------------------------------
| Upgrading
|--------------------------------------------------------------------------
|
| The upgrading process routes
|
*/
Route::group(['middleware' => ['web'], 'namespace' => 'App\Http\Controllers'], function () {
	Route::get('upgrade', 'UpgradeController@version');

});
Route::group(['middleware' => ['web'], 'namespace' => 'App\Http\Controllers'], function () {
	Route::get('upgrade', 'UpgradeController@version');
	Route::get('posts/create', 'Ajax\CountryController@provinces');
	Route::get('json-regencies','Ajax\CountryController@regencies');
    Route::get('json-districts', 'Ajax\CountryController@districts');
    Route::get('json-village', 'Ajax\CountryController@villages');
});

问候,

标签: laravelview

解决方案


如果您的设置正确,首先尝试检查您的路线,然后如果您觉得您的设置很好,请尝试使用此命令。

php artisan route:clear
php artisan config:clear
php artisan clear-compiled

推荐阅读