first commit;
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-09-17 23:01:26 -07:00
commit 1e8ae3d1e5
137 changed files with 24339 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Database\Factories;
use App\Models\Folder;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Folder>
*/
class FolderFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'user_id' => User::factory(),
'name' => fake()->unique()->words(2, true),
'parent_id' => null,
];
}
/**
* Indicate that the folder belongs under the given parent folder.
*/
public function childOf(Folder $folder): static
{
return $this->state(fn (array $attributes) => [
'parent_id' => $folder->id,
'user_id' => $folder->user_id,
]);
}
}