File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 55use Illuminate \Database \Eloquent \Factories \HasFactory ;
66use Illuminate \Database \Eloquent \Model ;
77use Illuminate \Database \Eloquent \SoftDeletes ;
8+ use Workbench \Database \Factories \RoleFactory ;
89
910class Role extends Model
1011{
@@ -14,4 +15,9 @@ class Role extends Model
1415 protected $ fillable = [
1516 'name ' ,
1617 ];
18+
19+ protected static function newFactory (): RoleFactory
20+ {
21+ return RoleFactory::new ();
22+ }
1723}
Original file line number Diff line number Diff line change 77use Illuminate \Database \Eloquent \Relations \BelongsToMany ;
88use Illuminate \Foundation \Auth \User as Authenticatable ;
99use Illuminate \Notifications \Notifiable ;
10+ use Workbench \Database \Factories \UserFactory ;
1011
1112class User extends Authenticatable
1213{
@@ -52,4 +53,9 @@ public function roles(): BelongsToMany
5253 {
5354 return $ this ->belongsToMany (Role::class);
5455 }
56+
57+ protected static function newFactory (): UserFactory
58+ {
59+ return UserFactory::new ();
60+ }
5561}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments