Files
InvoiceShelf/database/factories/NoteFactory.php
Darko Gjorgjijoski 6b80b5f48d Change namespace
2024-01-27 23:53:20 +01:00

33 lines
721 B
PHP

<?php
namespace Database\Factories;
use InvoiceShelf\Models\Note;
use InvoiceShelf\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class NoteFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Note::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'type' => $this->faker->randomElement(['Invoice', 'Estimate', 'Payment']),
'name' => $this->faker->word,
'notes' => $this->faker->text,
'company_id' => User::find(1)->companies()->first()->id,
];
}
}