在以下代码成功运行数据后运行var_dump($posts_id)
:
$posts_pins = DB::table('pins')
->join('posts', 'posts.id', '=', 'pins.post_id')
->where('pins.post_id', '=', $posts_id)
->get();
var_dump($posts_id);
exit();
输出
object(Illuminate\Support\Collection)[199]
protected 'items' =>
array (size=24)
0 => int 62
1 => int 63
2 => int 64
3 => int 65
4 => int 66
虽然var_dump($posts_pins)
带回一个空数组......有什么想法吗?
答案 0 :(得分:0)