Skip to content

Commit dd52e9a

Browse files
committed
Try again on the unique slug thing
1 parent 0351c21 commit dd52e9a

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

app/sprinkles/account/factories/Group.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
* General factory for the Group Model
1515
*/
1616
$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Group')->setDefinitions([
17-
'slug' => Faker::text(10),
1817
'name' => Faker::word(),
1918
'description' => Faker::paragraph(),
19+
'slug' => function ($object, $saved) {
20+
return uniqid();
21+
}
2022
]);

app/sprinkles/account/factories/Permissions.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
* General factory for the Permission Model
1515
*/
1616
$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Permission')->setDefinitions([
17-
'slug' => Faker::text(10),
1817
'name' => Faker::word(),
1918
'description' => Faker::paragraph(),
2019
'conditions' => Faker::word(),
20+
'slug' => function ($object, $saved) {
21+
return uniqid();
22+
}
2123
]);

app/sprinkles/account/factories/Roles.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
* General factory for the Role Model
1515
*/
1616
$fm->define('UserFrosting\Sprinkle\Account\Database\Models\Role')->setDefinitions([
17-
'slug' => Faker::text(10),
1817
'name' => Faker::word(),
1918
'description' => Faker::paragraph(),
19+
'slug' => function ($object, $saved) {
20+
return uniqid();
21+
}
2022
]);

0 commit comments

Comments
 (0)