Changeset 4b7e2d3 for database/factories/DepartmentFactory.php
- Timestamp:
- 10/23/21 04:03:46 (3 years ago)
- Branches:
- develop, master
- Children:
- b39afb5
- Parents:
- c6b84df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
database/factories/DepartmentFactory.php
rc6b84df r4b7e2d3 4 4 5 5 use App\Models\Department; 6 use App\Models\Folder; 6 7 use Carbon\Carbon; 7 8 use Illuminate\Database\Eloquent\Factories\Factory; 8 9 use Illuminate\Support\Facades\Storage; 10 use function Sodium\increment; 9 11 10 12 class DepartmentFactory extends Factory … … 24 26 public function definition() 25 27 { 26 $location = $this->faker->unique()->numberBetween(1 , 15);28 $location = $this->faker->unique()->numberBetween(10, 25); 27 29 Storage::disk('uploads')->makeDirectory('Departments/' . $location); 28 30 return [ 29 'name' => "Department" . $this->faker->unique()->firstName(),31 'name' => "Department" . ' ' . $this->faker->unique()->firstName(), 30 32 'code' => $location, 31 33 '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() 34 37 ]; 35 38 }
Note:
See TracChangeset
for help on using the changeset viewer.