rename ProjektRaeumealle ro ProjektObjekte und ProjektObjekteImDetail
This commit is contained in:
1 parent
7746b426b3
commit
967d6e5157
30 files changed
+342
-292
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class ProjektObjekteImDetail extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'projekte_id',
|
||||
'projekt_objekte_id',
|
||||
'methode_id',
|
||||
'top_nummer',
|
||||
'geschoss',
|
||||
'raumart',
|
||||
'faktor',
|
||||
'flaeche',
|
||||
'nutzwert',
|
||||
];
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
self::updated(function ($model) {
|
||||
Projekte::where('id', $model['projekte_id'])->update([
|
||||
'evaluation_gutachten' => false,
|
||||
'pdf_nutzwerte_status' => false,
|
||||
'pdf_gutachten_status' => false,
|
||||
'excel_nutzwerte_status' => false,
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
public function top_nummer()
|
||||
{
|
||||
return $this->belongsTo(ProjektObjekte::class, 'projekt_objekte_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user