Files
einundzwanzig-portal/database/factories/CategoryFactory.php
Shift e3c175e5fe Use Faker methods
Accessing Faker properties was deprecated in Faker 1.14.
2023-02-19 18:05:16 +01:00

30 lines
548 B
PHP

<?php
namespace Database\Factories;
use App\Models\Category;
use Illuminate\Database\Eloquent\Factories\Factory;
class CategoryFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Category::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
return [
'name' => $this->faker->name(),
'slug' => $this->faker->slug(),
];
}
}