30 lines
636 B
PHP
30 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Allgemeinflaechen extends Model
|
|
{
|
|
protected $fillable = [
|
|
'projekte_id',
|
|
'geschoss',
|
|
'raumart',
|
|
'flaeche',
|
|
];
|
|
|
|
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,
|
|
]);
|
|
});
|
|
}
|
|
}
|