作者 lyh

gx

@@ -20,7 +20,6 @@ class News extends Base @@ -20,7 +20,6 @@ class News extends Base
20 if(!$value){ 20 if(!$value){
21 return date('Y-m-d H:i:s', strtotime($this->getAttribute('created_at'))); 21 return date('Y-m-d H:i:s', strtotime($this->getAttribute('created_at')));
22 } 22 }
23 -  
24 return $value; 23 return $value;
25 } 24 }
26 } 25 }
@@ -164,4 +164,10 @@ class Product extends Base @@ -164,4 +164,10 @@ class Product extends Base
164 // return self::where('project_id', $project_id)->where('status', self::STATUS_ON)->count(); 164 // return self::where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
165 // } 165 // }
166 166
  167 + public function getSendTimeAttribute($value){
  168 + if(!$value){
  169 + return date('Y-m-d H:i:s', strtotime($this->getAttribute('created_at')));
  170 + }
  171 + return $value;
  172 + }
167 } 173 }