Textadventures: one author per game pls
This commit is contained in:
parent
19f764053f
commit
e28d49dc71
|
@ -87,8 +87,8 @@ class Textadventures extends Source {
|
|||
}
|
||||
$game->save();
|
||||
$game->languages()->sync([$language->id]);
|
||||
if (isset($author)) {
|
||||
$game->authors()->sync([$model->id]);
|
||||
if (isset($author) && !$game->authors()->where('id', $model->id)->exists()) {
|
||||
$game->authors()->attach($model);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue