芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/database/factories/ProjectFactory.php
subMonths(fake()->numberBetween(1, 6)); $projectName = fake()->unique(true)->randomElement($projectArray); /* @phpstan-ignore-line */ return [ 'project_name' => $projectName, 'project_summary' => fake()->paragraph, 'start_date' => $startDate->format('Y-m-d'), 'deadline' => $startDate->addMonths(4)->format('Y-m-d'), 'notes' => fake()->paragraph, 'completion_percent' => fake()->numberBetween(40, 100), 'feedback' => fake()->realText(), 'project_short_code' => $this->initials($projectName), 'calculate_task_progress' => 'false', ]; } protected function initials($str): string { $ret = ''; $array = explode(' ', $str); if (count($array) === 1) { return strtoupper(substr($str, -4)); } foreach ($array as $word) { $ret .= strtoupper($word[0]); } return $ret; } }