Migrations, Seeders, Models, Resources for User, Client, Project, Team, Mastertask, Subtask, Timeblock, Timesheet, Attachment

This commit is contained in:
StudioTem committed 2023-01-24 17:38:24 +01:00
1 parent 30ae7dab84
commit 8d88c0c4e6
35 files changed
+910 -14

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Database\Factories;
use App\Models\Client;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Project>
*/
class ProjectFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
$name = fake()->country();
$client = Client::factory('App\Models\Client')->create();
return [
'client_id' => $client->id,
'name' => 'Project ' . $name,
'code' => strtoupper(substr($name, 0, 3)) . '-2023-' . rand(1, 9),
];
}
}