Browse Source

Merge pull request #4930 from epalmans/master

Attribute casting for 'email_verified_at' on User model stub (with explanation)
Taylor Otwell 5 years ago
parent
commit
3702622461
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/User.php

+ 9 - 0
app/User.php

@@ -27,4 +27,13 @@ class User extends Authenticatable
     protected $hidden = [
         'password', 'remember_token',
     ];
+
+    /**
+     * The attributes that should be cast to native types.
+     *
+     * @var array
+     */
+    protected $casts = [
+        'email_verified_at' => 'datetime',
+    ];
 }