Hey guys,
I have an user field preferences which is a string: Pref1, Pref2, Pref3.
I’m trying to return this in a list of checkboxes, as described in the docs:
<?php foreach($user->preferences()->split(', ') as $pref): ?>
<fieldset>
<?php echo html($pref) ?>
</fieldset>
<?php endforeach ?>
But I’m getting this error:
Call to a member function split() on string
Isn’t the split() supposed to get called on a string?
Would love some help!