I have a MySQL table categories
with following columns:
I retrieved the data using
$categories = Categories::find('all');
Now, I want to create a <select>
tag with options whose value is $category->id
and title is $category->name
using form helper.
How to do that?
try $categories = Categories::find('list');