|
@@ -452,6 +452,16 @@ abstract class Model {
|
|
if ( ! $this->exists) $this->created_at = $this->updated_at;
|
|
if ( ! $this->exists) $this->created_at = $this->updated_at;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ *Updates the timestamp on the model and immediately saves it.
|
|
|
|
+ *
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ public function touch(){
|
|
|
|
+ $this->timestamp();
|
|
|
|
+ $this->save();
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Get a new fluent query builder instance for the model.
|
|
* Get a new fluent query builder instance for the model.
|
|
*
|
|
*
|