summaryrefslogtreecommitdiff
path: root/src/Models/BaseModel.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-16 12:06:18 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-16 12:06:18 +0200
commit0734807eef5a6b638b06d57aef6ee59ac78a3456 (patch)
tree3af73fdc293ab18962078c1a92e07d803009f1f5 /src/Models/BaseModel.php
parentd0abc27c079f058c40a74b89e54bd21ba4aad53e (diff)
parentac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff)
Merge remote-tracking branch 'MyIgel/logentry-model'
Diffstat (limited to 'src/Models/BaseModel.php')
-rw-r--r--src/Models/BaseModel.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Models/BaseModel.php b/src/Models/BaseModel.php
new file mode 100644
index 00000000..cf718e4f
--- /dev/null
+++ b/src/Models/BaseModel.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Engelsystem\Models;
+
+use Illuminate\Database\Eloquent\Model;
+
+abstract class BaseModel extends Model
+{
+ /** @var bool Disable timestamps by default because of "Datensparsamkeit" */
+ public $timestamps = false;
+
+ /**
+ * @param array $attributes
+ * @return BaseModel
+ */
+ public function create(array $attributes = [])
+ {
+ $instance = new static($attributes);
+ $instance->save();
+
+ return $instance;
+ }
+}