From c7b55401d411dc954ebcc4d155c1d37a478aafd9 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 9891a717..21bd8d14 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -44,6 +44,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. */