php - 路线 404 错误 Laravel
问题描述
我遇到了一个我不太明白的错误。该路线似乎在我的开发机器(Windows 10、php 7)上运行良好,但在共享 linux 主机上出现 404 错误。
下面是代码:
路线
Auth::routes();
Route::get('/curries','CurriessController@index')->name('curries');
Route::resource('/curries','CurriesController');
链接
<td><a href="/curries/{{$curry->id}}"> {{$curry->curry_title}}</a></td>
我也试过route('curry.index', $curry->id
对我来说没有意义的是它可以在 Windows 上运行,但 404 在 linux 上运行。请协助
解决方案
- Make sure the Model exists
- Make sure the table exists in the database
- replace your link with
<td><a href="{{route('curries.index')}}/{{$curry->id}}">Type of Curry</a></td>
This should work
推荐阅读
- android - 通过 AppCenter 部署时应用屏幕为空白
- c - 为什么 * 和 % 在这条规则中表现不同?
- python - 我如何在python中验证以下输入(十六进制间隔值)
- ssl - 但是,托管具有活动 SSL 证书的网站,导航到 www.example.com 会导致我访问 Http 而不是 Https
- javascript - 需要帮助使用某种类型的样式与反应
- android - Firebase 文档未删除
- c++ - 将二维数组中的符号分成 2 组
- javascript - 包含数组对象的 JSON - ajax 调用结果为空
- r - 对行子集执行计算
- python-3.x - 在python中,如何组合两个形状相似但不完全相同的np数组