Remove EncodeUTF8 infavour of using attribute casting only. The implementation of EncodeUTF8 was not correct, essentially removing any previous casting causing issues when saving a record.

This commit is contained in:
2024-06-01 10:46:02 +10:00
parent b5047c52f0
commit 73cf421739
10 changed files with 66 additions and 164 deletions

View File

@@ -15,24 +15,11 @@ use App\Models\{Address,Echomail};
trait MessageAttributes
{
use EncodeUTF8;
// Items we need to set when creating()
public Collection $set;
// Validation Errors
public ?MessageBag $errors = NULL;
private const cast_utf8 = [
'to',
'from',
'subject',
'msg',
'msg_src',
'origin',
'tearline',
'tagline',
];
public function __construct()
{
parent::__construct();