PHP – Laravel – Get Required Fields against an Array

The following php example helps you to get the required fields from the table against an array into Laravel. 

Code Example:

$id = array(1, 55, 105)
// get the required data from the table against an array.
Model::select('id', 'name', 'email')
->whereIn('id', $id)

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail