当我试图使url像有id的url时,就会出现这个问题。
未能加载资源:服务器响应状态为404 (未找到)
Route::get('/doctor/{doctorId}', [App\Http\Controllers\DoctorController::class, 'services'])->name('doctor.profile');
如果我从其他没有id的url中查看页面,我知道这很奇怪,我也不知道为什么!
发布于 2022-02-23 04:34:50
尝试此操作,这将生成您注册的方法、URI和Action。
php artisan route:list --compact
如果尚未找到URI '/doctor/{doctorId}'
,请输入以下内容
php artisan route:cache
发布于 2022-02-23 13:45:10
如果找不到模型,通常会显示404消息。
$model = SomeModel::find(doctorId)
dd($model)
结果是dd = null / hense错误。
https://stackoverflow.com/questions/71229647
复制相似问题