In this tutorial we will see the use of Eloquent Pluck method to fetch specific key values from model and populate values into Select box. pluck() method is for Laravel Collection and more frequently for Eloquent Collection.
Starting from Laravel version 5.3 lists is deprecated and pluck method is used.
and we have to populate those names in select box with ids as thier respective values: Define a Route
After hitting the specified route , we will get a view something like following : http://wp.5balloons.info/wp-content/uploads/2022/07/Screenshot-2022-07-29-at-3.13.44-PM.png here is a short description of populating select box using Pluck method on Eloquent model.