1
0
Fork 0

app/Models/Recipe.php: add spell relationship.

This commit is contained in:
Henrik Hautakoski 2021-07-07 16:27:03 +02:00
parent 78d5d8d50e
commit 86a0474a89
3 changed files with 29 additions and 1 deletions

View file

@ -4,6 +4,7 @@ namespace Database\Factories;
use App\Models\Profession;
use App\Models\Item;
use App\Models\Spell;
use App\Models\Recipe;
use App\Models\RecipeCategory;
@ -30,6 +31,7 @@ class RecipeFactory extends Factory
'profession_id' => Profession::factory(),
'category_id' => RecipeCategory::factory(),
'item_id' => Item::factory(),
'spell_id' => Spell::factory(),
//'slug' => function (array $attributes) {
// return Str::slug(Item::find($attributes['item_id'])->name);
//}