,我發現了以下錯誤:ErrorException在UrlGenerator.php行605:行動應用程序\ HTTP \控制器\ VehicleController @ processLead沒有定義。沒有定義動作 - ErrorException在UrlGenerator.php線605
如果使用command php artisan route:list
存在的路線我已經檢查和它的作用。
路線\ web.php
<?php
use App\Http\Controllers\BaseController;
use App\Http\Controllers\VehicleController;
use App\Http\Requests\ValidateLeadValues;
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/
Route::get('/', '[email protected]');
Route::get('usedcars/', '[email protected]');
Route::post('processLead/{id}', function ($id, ValidateLeadValues $leadValues, VehicleController $vehicleController)
{
return $vehicleController->processLead($id, $leadValues);
})->where(['id' => '[0-9]+']);
我有我的看法文件中的以下。代碼在我的表單中,當我刪除它時,頁面加載正常。
{{ action('[email protected]', ['id' => $vehicle->id]) }}
你有更新嗎?也許你在不同的庫上有錯誤的版本。 – Carles
是的,我做了作曲家更新。更新之前一切正常,現在我收到了這個錯誤。 – VenomRush