From 5aee46d6b734be848e76645566345670a11615db Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 3 Aug 2015 08:54:40 +0100 Subject: [PATCH] Casts the subscriber --- app/Models/Subscriber.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index e0767a56..5587a57d 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -43,6 +43,16 @@ class Subscriber extends Model implements HasPresenter */ protected $dates = ['verified_at']; + /** + * The attributes that should be casted to native types. + * + * @var string[] + */ + protected $casts = [ + 'email' => 'string', + 'verify_code' => 'string', + ]; + /** * Overrides the models boot method. */