added Orte-Table

This commit is contained in:
chrosey
2017-07-08 10:26:50 +02:00
parent 8b98db74a2
commit 8cfa2762db
9 changed files with 109 additions and 3557 deletions
+7 -1
View File
@@ -10,7 +10,7 @@ class Veranstaltung extends Model
protected $fillable = ['name','beginn','ende','geaste','hinweise'];
protected $dates = ['beginn', 'ende'];
protected $dates = ['beginn', 'ende', 'created_at', 'updated_at'];
public function eintragungen(){
return $this->hasMany('App\Eintragung');
@@ -19,4 +19,10 @@ class Veranstaltung extends Model
public function einteilungen(){
return $this->hasMany('App\Einteilung');
}
public function getIstEingetragenAttribute(){
$amI = $this->eintragungen->count('user_id', "=", \Auth::id());
return $amI > 0;
}
}