Changeset df6e9ec for database


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

Location:
database
Files:
2 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()
  • database/seeders/FoldersTableSeeder.php

    r94f05dc rdf6e9ec  
    1717    public function run()
    1818    {
    19         Folder::factory()->count(5)->create();
     19        Folder::factory()->count(900)->create();
    2020        $folders = Folder::all();
    2121
Note: See TracChangeset for help on using the changeset viewer.