次のエラーが表示されます:ErrorException UrlGenerator.php行605:アクションApp \ Http \ Controllers \ VehicleController @ processLeadが定義されていません。アクションが定義されていません - UrlGenerator.php行のErrorException 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