* @author Graham Campbell * @author James Brooks */ trait TimestampsTrait { /** * Present formatted date time. * * @return string */ public function created_at() { return app(DateFactory::class)->make($this->wrappedObject->created_at)->toDateTimeString(); } /** * Present formatted date time. * * @return string */ public function updated_at() { return app(DateFactory::class)->make($this->wrappedObject->updated_at)->toDateTimeString(); } /** * Present formatted date time. * * @return string */ public function deleted_at() { return app(DateFactory::class)->make($this->wrappedObject->deleted_at)->toDateTimeString(); } /** * Get the incident date format setting, or fallback to a sane default. * * @return string */ protected function incidentDateFormat() { return Config::get('setting.incident_date_format', 'l jS F Y H:i:s'); } }