faker->unique()->numberBetween('1', '9'); Storage::disk('local')->makeDirectory('Departments/' . $location); return [ 'name' => "Department" . $this->faker->unique()->firstName(), 'code' => $location, 'location' => Storage::disk('local')->path('') . 'Departments' . DIRECTORY_SEPARATOR . $location, 'user_id' => $this->faker->numberBetween('1', '2'), 'created_at' => Carbon::now() ]; } }