laravel - 根据食物搜索特定餐厅
问题描述
我有一个搜索输入,用户应该在其中搜索以便返回结果
<div class="field" id="searchform">
<input type="text" id="searchterm" placeholder="e.g mutton
karahi,pizza..." />
<button type="button" id="search"
onclick="window.location='http://localhost:8000/search'">Find Food!</button>
</div>
食物项目位于名为 foods 的表中,该表具有以下字段
$table->bigIncrements('id');
$table->timestamps();
$table->integer('price');
$table->string('food_item')
$table->integer('restaurant_id');
});
对于食物表获取 restaurant_id 的餐厅来说,这是一个不同的表
怎么办
解决方案
推荐阅读
- javascript - shopify上的金钱过滤器不适用于脚本
- vue.js - Vue SVG/HTML 属性插值
- node.js - 使用 Web Pack 开发服务器忽略在 React js 中观看公共文件夹
- reactjs - 从 facebook 应用程序打开网站后 react-facebook-login 不起作用
- google-data-studio - 有没有办法显示 Data Studio 报表中的数据上次刷新的时间?
- r - 优化问题 | 求解具有两个条件的 4 个参数的方程
- flutter - 我们可以在flutter中提供URL而不是FlareActor中的资产吗?
- kendo-ui - .net Core 3.1 的剑道
- java - 使用流从文件中解析字符串
- c - 跨平台网络接口枚举