From a748fa8d5070fde59f9563a5efa6c8c8e7ce1a95 Mon Sep 17 00:00:00 2001 From: Jordan Doyle Date: Sat, 15 Oct 2016 14:41:15 +0100 Subject: [PATCH] autocasting to carbon dates --- src/Models/Post.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Models/Post.php b/src/Models/Post.php index b05f4c2..9a9071f 100644 --- a/src/Models/Post.php +++ b/src/Models/Post.php @@ -17,6 +17,10 @@ class Post extends Model public $table = DB_PREFIX . 'posts'; public $primaryKey = 'ID'; + public $timestamps = false; + + public $dates = ['post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt']; + /** * Get all the posts within a certain post type. * -- libgit2 1.7.2