1234567891011121314151617181920212223242526272829 |
- <?php
- namespace Database\Factories;
- use App\Models\Library;
- use Illuminate\Database\Eloquent\Factories\Factory;
- use Illuminate\Support\Facades\Auth;
- /**
- * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Folder>
- */
- class FolderFactory extends Factory
- {
- /**
- * Define the model's default state.
- *
- * @return array<string, mixed>
- */
- public function definition(): array
- {
- return [
- "library_id" => Library::factory()->create(),
- "company_id" => Auth::user()->company_id,
- "name" => fake()->name(),
- "parent_id" => 0,
- "sequence" => 0,
- ];
- }
- }
|