summaryrefslogtreecommitdiff
path: root/src/Models/BaseModel.php
blob: cf718e4fccda979f195f89cc3e281f5eb75f3074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
    }
}