remove faker from prod

This commit is contained in:
Andras Bacsai
2023-05-02 09:11:22 +02:00
parent 7377f80bdd
commit 4ebae8dcf6
6 changed files with 70 additions and 7 deletions

View File

@@ -10,8 +10,7 @@ class EmptyProject extends Component
public function createEmptyProject()
{
$project = Project::create([
'name' => fake()->company(),
'description' => fake()->sentence(),
'name' => generateRandomName(),
'team_id' => session('currentTeam')->id,
]);
return redirect()->route('project.environments', ['project_uuid' => $project->uuid, 'environment_name' => 'production']);

View File

@@ -79,8 +79,7 @@ class PublicGitRepository extends Component
if ($this->type === 'project') {
$project = Project::create([
'name' => fake()->company(),
'description' => fake()->sentence(),
'name' => generateRandomName(),
'team_id' => session('currentTeam')->id,
]);
$environment = $project->environments->first();
@@ -89,7 +88,7 @@ class PublicGitRepository extends Component
$environment = $project->environments->where('name', $this->parameters['environment_name'])->firstOrFail();
}
$application_init = [
'name' => fake()->words(2, true),
'name' => generateRandomName(),
'git_repository' => $git_repository,
'git_branch' => $git_branch,
'build_pack' => 'nixpacks',