I have a MySQL
table and I can't change the structure because is from Asterisk. Two columns have troubled names and I don't know how to handle it using Eloquent
.
$row = new Extension;
$row->call-limit = $calllimit;
$row->dynamic = $dynamic;
$row->save();
call-limit
have a dash and dynamic
is a reserved word.
Thanks
Try this:
$row->getAttribute('call-limit');
$row->setAttribute('call-limit', $limit);