summaryrefslogtreecommitdiff
path: root/src/Models/BaseModel.php
diff options
context:
space:
mode:
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;
+ }
+}