3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-07 08:18:30 +00:00
Files
snipe-it/database/factories/ReportTemplateFactory.php
2026-03-13 18:12:37 +00:00

41 lines
781 B
PHP

<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class ReportTemplateFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->word(),
'options' => [
'id' => '1',
],
'created_by' => User::factory(),
'is_shared' => 0,
];
}
public function shared()
{
return $this->state(function () {
return ['is_shared' => 1];
});
}
public function notShared()
{
return $this->state(function () {
return ['is_shared' => 0];
});
}
}