clone & meine
This commit is contained in:
1 parent
d6e4789797
commit
23bed33cf3
23 files changed
+34880
-578
No files matched your search
+29
-1
@@ -7,12 +7,27 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Projekte extends Model
|
||||
{
|
||||
use \Bkwld\Cloner\Cloneable;
|
||||
|
||||
protected $cloneable_relations = [
|
||||
'projekt_objekte',
|
||||
'projekt_platzhalters',
|
||||
'projekt_allgemeinflaechens',
|
||||
'projekt_raeumealles',
|
||||
'projekt_methodes',
|
||||
'projekt_inhaltsverzeichnis',
|
||||
'projekt_merkmale',
|
||||
];
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'konto_id',
|
||||
'auftraggeber_id',
|
||||
'gutachter_id',
|
||||
'offizieller_name',
|
||||
'interner_name',
|
||||
'offizieller_name',
|
||||
'ort',
|
||||
'beschreibung',
|
||||
'erstellung',
|
||||
@@ -24,6 +39,9 @@ class Projekte extends Model
|
||||
'evaluation_gutachten',
|
||||
'pdf_nutzwerte_tabellen_umbruch',
|
||||
'bezahlt_am',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -40,6 +58,11 @@ class Projekte extends Model
|
||||
];
|
||||
}
|
||||
|
||||
public function meine()
|
||||
{
|
||||
return $this->belongsToMany(Projekte::class, 'projekt_users', 'projekte_id', 'user_id');
|
||||
}
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::addGlobalScope(new KontoScope);
|
||||
@@ -50,6 +73,11 @@ class Projekte extends Model
|
||||
return $this->hasMany(ProjektObjekte::class);
|
||||
}
|
||||
|
||||
public function projekt_merkmale()
|
||||
{
|
||||
return $this->hasMany(ProjektMerkmale::class);
|
||||
}
|
||||
|
||||
public function auftraggeber()
|
||||
{
|
||||
return $this->belongsTo(Auftraggeber::class);
|
||||
|
||||
Reference in new issue
Block a user