first change
This commit is contained in:
34
Modules/Employee/database/factories/DesignationFactory.php
Normal file
34
Modules/Employee/database/factories/DesignationFactory.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Employee\Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class DesignationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*/
|
||||
protected $model = \Modules\Employee\Models\Designation::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
static $order = 1;
|
||||
$title = $this->faker->firstName();
|
||||
|
||||
return [
|
||||
'title' => $title,
|
||||
'slug' => Str::slug($title),
|
||||
'status' => $this->faker->randomElement([0, 1]),
|
||||
'order' => $order++,
|
||||
'department_id' => 1,
|
||||
'createdby' => 1,
|
||||
'updatedby' => 1,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user