Changeset df6e9ec for database/factories


Ignore:
Timestamp:
10/24/21 23:35:45 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
develop, master
Children:
495dd28
Parents:
94f05dc
Message:

edited folder seeder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • database/factories/FolderFactory.php

    r94f05dc rdf6e9ec  
    2727    public function definition()
    2828    {
     29        $inputArray = [5, 15, 25, 35, 45, 55, 65, 75];
     30        $deptId = Arr::random($inputArray);
    2931
    30         $deptCode = Department::find(1)->code;
     32        $deptCode = Department::find($deptId)->code;
    3133
    3234        $name = $this->faker->unique()->firstName();
     
    4143            'location' => $location,
    4244            'user_id' => 1,
    43             'department_id' => 1,
     45            'department_id' => $deptId,
    4446            'is_important' => $this->faker->boolean,
    4547            'created_at' => now()
Note: See TracChangeset for help on using the changeset viewer.