[英]Failed to load resource: the server responded with a status of 404 (Not Found) Laravel on Heroku
[英]Laravel | Failed to load resource: the server responded with a status of 404 (Not Found)
當我嘗試制作 url 時,會出現這個問題
加載資源失敗:服務器響應狀態為 404(未找到)
Route::get('/doctor/{doctorId}', [App\Http\Controllers\DoctorController::class, 'services'])->name('doctor.profile');
如果我從其他沒有 id 的 url 查看頁面,我知道這很奇怪,我不知道為什么!!!
試試這個,這將生成 Method、URI 和 Action Class did you registered。
php artisan route:list --compact
如果您還沒有找到您的 URI '/doctor/{doctorId}'
,那么輸入這個
php artisan route:cache
如果找不到 model,通常會顯示 404 消息。
$model = SomeModel::find(doctorId)
dd($model)
導致 dd = null / hense 錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.