davy_yg
3 months ago

Casts

Posted 3 months ago by davy_yg

Hello,

I have a question regarding casts in model. If you define the phone as integer in casts and the user input a string will there be an error message?

protected $casts = [
    'phone' => 'integer'
];

Please sign in or create an account to participate in this conversation.