错误截图未知命名参数$id
我正在使用Laravel 7。我已经成功注册了一个用户。验证邮件已按预期成功发送到我的mailtrap收件箱。但当我点击"验证电子邮件地址"时;按钮或电子邮件中提供的URL,它给了我上面的错误。请帮忙。谢谢你。
这是我的homecontroller。php
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware(['auth', 'verified']);
}
/**
* Show the application dashboard.
*
* @return IlluminateContractsSupportRenderable
*/
public function index()
{
return view('home');
}
}
This is my web.php
<?php
use IlluminateSupportFacadesRoute;
use IlluminateSupportFacadesAuth;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
//return view('myhome');
});
Auth::routes(['verify' => true]);
Route::get('/home', 'HomeController@index')->name('home');
我更新了我的作曲家。Json,这为我修复了它。composer update
我的PHP版本是8.0,改成7.4修复了这个错误。
sudo update-alternatives --set php /usr/bin/php7.4