Answers for "laravel id in array"

PHP
2

Laravel get only the Ids of an eloquent arrays

$post_ids = Post::pluck('id')->toArray();
Posted by: Guest on July-18-2021
3

laravel where in array

$items = Item::whereIn('id', [1,2,..])->get();
Posted by: Guest on May-01-2021

Browse Popular Code Answers by Language