Ignore:
Timestamp:
10/23/21 04:03:46 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
develop, master
Children:
b39afb5
Parents:
c6b84df
Message:

bug fixes, edited export, added fileSeeder for DB testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • database/factories/DepartmentFactory.php

    rc6b84df r4b7e2d3  
    44
    55use App\Models\Department;
     6use App\Models\Folder;
    67use Carbon\Carbon;
    78use Illuminate\Database\Eloquent\Factories\Factory;
    89use Illuminate\Support\Facades\Storage;
     10use function Sodium\increment;
    911
    1012class DepartmentFactory extends Factory
     
    2426    public function definition()
    2527    {
    26         $location = $this->faker->unique()->numberBetween(1, 15);
     28        $location = $this->faker->unique()->numberBetween(10, 25);
    2729        Storage::disk('uploads')->makeDirectory('Departments/' . $location);
    2830        return [
    29             'name' => "Department" . $this->faker->unique()->firstName(),
     31            'name' => "Department" . ' ' . $this->faker->unique()->firstName(),
    3032            'code' => $location,
    3133            'location' => 'Departments' . DIRECTORY_SEPARATOR . $location,
    32             'user_id' => $this->faker->numberBetween('1', '2'),
    33             'created_at' => Carbon::now()
     34            'no_of_folders' => 0,
     35            'user_id' => "1",
     36            'created_at' => $this->faker->dateTime()
    3437        ];
    3538    }
Note: See TracChangeset for help on using the changeset viewer.