Question and answer is powered by AnsPress.io
I am using the eloquent method to retrieve data from the database and I want to select data where MySQL table column name match some value.
Retrieve data use the eloquent method in Laravel by where clause, you can try this code:
For example:
<?php $sql=MyModel::where('id',$id)->get();