【发布时间】:2023-12-04 09:06:02
【问题描述】:
我想从控制器的表中获取多行数据。 就像我有一张喜欢的桌子 列是 id 和 value 我想得到这样的说法。 select * from likes where id is this and value is that 。
【问题讨论】:
-
你能解释一下你想要达到的目标吗?
标签: laravel-5 rows multiple-value
我想从控制器的表中获取多行数据。 就像我有一张喜欢的桌子 列是 id 和 value 我想得到这样的说法。 select * from likes where id is this and value is that 。
【问题讨论】:
标签: laravel-5 rows multiple-value
我不太明白你的问题,但为了“从喜欢中选择 * id 是这个,值是那个”,试试
App\Likes::where('id', this)
->where('value', that)
->get();
希望对您有所帮助。阅读更多https://laravel.com/docs/5.5/queries#where-clauses
【讨论】: