snipe-it/database/factories/StatusLabelFactory.php
Laravel Shift 934afa036f Adopt Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
2021-06-10 20:15:52 +00:00

68 lines
1.7 KiB
PHP

<?php
use App\Models\Statuslabel;
$factory->define(Statuslabel::class, function (Faker\Generator $faker) {
return [
'name' => $faker->sentence,
'created_at' => $faker->dateTime(),
'updated_at' => $faker->dateTime(),
'user_id' => 1,
'deleted_at' => null,
'deployable' => 0,
'pending' => 0,
'archived' => 0,
'notes' => '',
];
});
$factory->state(Statuslabel::class, 'rtd', function (Faker\Generator $faker) {
return [
'notes' => $faker->sentence,
'deployable' => 1,
'default_label' => 1,
];
});
$factory->state(Statuslabel::class, 'pending', function (Faker\Generator $faker) {
return [
'notes' => $faker->sentence,
'pending' => 1,
'default_label' => 1,
];
});
$factory->state(Statuslabel::class, 'archived', function (Faker\Generator $faker) {
return [
'notes' => 'These assets are permanently undeployable',
'archived' => 1,
'default_label' => 0,
];
});
$factory->state(Statuslabel::class, 'out_for_diagnostics', function (Faker\Generator $faker) {
return [
'name' => 'Out for Diagnostics',
'default_label' => 0,
];
});
$factory->state(Statuslabel::class, 'out_for_repair', function (Faker\Generator $faker) {
return [
'name' => 'Out for Repair',
'default_label' => 0,
];
});
$factory->state(Statuslabel::class, 'broken', function (Faker\Generator $faker) {
return [
'name' => 'Broken - Not Fixable',
'default_label' => 0,
];
});
$factory->state(Statuslabel::class, 'lost', function (Faker\Generator $faker) {
return [
'name' => 'Lost/Stolen',
'default_label' => 0,
];
});