app/Models/Recipe.php: add spell relationship.
This commit is contained in:
parent
78d5d8d50e
commit
86a0474a89
3 changed files with 29 additions and 1 deletions
|
|
@ -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);
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue