1
0
Fork 0

Merge branch 'description'

This commit is contained in:
Henrik Hautakoski 2022-11-17 22:33:47 +01:00
commit 7ddb89069d
4 changed files with 32 additions and 2 deletions

View file

@ -202,7 +202,8 @@ class ImportProfession implements ShouldQueue
$recipe = $profession->recipes()->create([
'item_id' => $crafted ? $crafted->id : null,
'spell_id' => $spell->id,
'category_id' => $category->id
'category_id' => $category->id,
'description' => isset($data->description) ? $data->description : null
]);
}
// Existing record.
@ -216,6 +217,10 @@ class ImportProfession implements ShouldQueue
if (!$recipe->spell) {
$recipe->spell()->associate($spell);
}
if ($recipe->description === NULL && isset($data->description)) {
$recipe->description = $data->description;
}
}
// Insert/Update Reagents

View file

@ -34,7 +34,8 @@ class Recipe extends Model
'profession_id',
'category_id',
'item_id',
'spell_id'
'spell_id',
'description'
];
/**