about model create whiteList

Excuse me,How to use the model in create to whiteList? thanks

    $user = new Users();
    $fields = array('username', 'age', 'created_at');
    $user->save(array('username'=>'john', 'age'=>18), $fields);
    echo $user->age;


1.5k

sorry, I am a Chinese

I'm thinking that you are going to need to ask your question again in better English and in a more detailed form.



2.0k

Don't worry. I can't get what you want to say, though.

If the code of @trentramseyer is what you wanted to know, would you please click Accept Answer button?



1.5k

very thanks, I failed, Because the current framework required to write the mysql fields by default

  $user = new Users();
   $fields = array('username', 'age', 'created_at');
   $user->save(array('username'=>'john', 'age'=>18), $fields);
   echo $user->age;


1.5k

sorry, I'm Chinese,But still thank you, I failed, Because the current framework required to write the mysql fields by default

Don't worry. I can't get what you want to say, though.

If the code of @trentramseyer is what you wanted to know, would you please click Accept Answer button?



2.0k

Because the current framework required to write the mysql fields by default

I can't get what you say.

What happened? Did you get error messages?

And what you exactly want to do? What do you mean by "whitelist"?