Reputation: 382
I'm new to Laravel, but now I want to populate the value that I set as enum
in MySQL database to a select box using Laravel 4 for my Schema like below
$table->enum('user_type', array('premium','free','agent free','agent premium'));
Upvotes: 2
Views: 2126
Reputation: 8321
Here is the reference on the doc.
{{ Form::select('user_type',
array( 'premium' => 'premium', 'free' => 'free','agent free' => 'agent free', 'agent premium' => 'agent premium'),
$user->user_type) }}
Upvotes: 2