Answers for "laravel get models whete 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
0

laravel load models by id array

$models = Model::findMany([1, 2, 3]);
Posted by: Guest on April-01-2020

Browse Popular Code Answers by Language