Changeset 120759b for database/factories
- Timestamp:
- 10/15/21 00:21:44 (3 years ago)
- Branches:
- develop, master
- Children:
- d795fa6
- Parents:
- 24a616f
- Location:
- database/factories
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
database/factories/DepartmentFactory.php
r24a616f r120759b 4 4 5 5 use App\Models\Department; 6 use Carbon\Carbon; 6 7 use Illuminate\Database\Eloquent\Factories\Factory; 8 use Illuminate\Support\Facades\Storage; 7 9 8 10 class DepartmentFactory extends Factory … … 22 24 public function definition() 23 25 { 26 $location = $this->faker->unique()->numberBetween(1, 99); 27 Storage::disk('local')->makeDirectory('Departments/' . $location); 24 28 return [ 25 'name' => $this->faker->name(), 26 'code' => $this->faker->unique()->numerify(), 27 'location' => $this->faker->unique()->name(), 28 'user_id' => "1", 29 'id' => $this->faker->unique()->randomNumber(), 30 'name' => $this->faker->domainName(), 31 'code' => $location, 32 'location' => 'Departments/' . $location, 33 'user_id' => $this->faker->numberBetween('1', '2'), 34 'created_at' => Carbon::now() 29 35 ]; 30 36 }
Note:
See TracChangeset
for help on using the changeset viewer.