I am using Laravel lucid framework and I have to call model setAttribute
explicitly but getting below error:
ErrorException: Array to string conversion in
Code is
$user = new User;
$user->setAttribute('email',$this->email);
print_r($user);exit();
Please help
Thanks
Try to use implode() method ? :
$test = implode('', $array);
$user = new User;
$user->setAttribute('email', $test);
print_r($user);
exit();