Level 54
Can you show us your code currently?
Hello guys. First of all, thanks for the interest in my topic. I have a simple question i guess.
There is a way to my checkboxes always display "Yes" or "No" in my "VIEWS" instead of "0" and "1"?
Thanks a lot! Have a nice day :)
Is this from data in the database?
Accessor? - http://laravel.com/docs/5.0/eloquent#accessors-and-mutators
class ModelName extends Model {
public function getSomeCheckboxAttribute($value)
{
return ($value ? 'Yes' : 'No');
}
}
Please or to participate in this conversation.