engelsystem/src/Models/BaseModel.php

24 lines
471 B
PHP
Raw Normal View History

2018-08-31 01:55:05 +02:00
<?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;
}
}