49 Commits

Author SHA1 Message Date
Nuno Maduro
73cf5bc5bc
[10.x] Fixes missing property description (#6275)
* Fixes missing property description

* Update UserFactory.php

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
2023-11-20 09:20:28 -06:00
Tim MacDonald
7fe97a165a
[10.x] Update fixture hash to match testing cost (#6259)
* Update fixture hash to match testing cost

* Conditionally use lower cost in tests

* use hash facade and memoize

* remove import

---------

Co-authored-by: Taylor Otwell <taylor@laravel.com>
2023-10-24 09:11:07 -05:00
Julius Kiekbusch
8e5f0e5d00
Use 12 bcrypt rounds for password in UserFactory (#6247) 2023-09-22 13:03:48 -05:00
Ngô Quốc Đạt
330995f6bd
Remove redundant @return docblock in UserFactory (#6119) 2023-02-18 14:54:42 -06:00
Nuno Maduro
55af5469c3
[10.x] Uses PHP Native Type Declarations 🐘 (#6010)
* Adds basic typing around method's arguments and return types

* Adds missing `closure` type

* Adds typing on tests

* Fixes `RedirectIfAuthenticated`

* Fixes `Authenticate`

* Improves `RedirectIfAuthenticated` types

* Fixes user factory `unverified` return type
2023-01-03 10:35:24 +01:00
Martin Ro
ad219e82aa
Make email unique (#5978)
When seeding large amounts of users there is a chance for a duplicate entry SQL error because the email column is unique. 64e0175398/database/migrations/2014_10_12_000000_create_users_table.php (L19)
2022-09-02 09:10:54 -05:00
Taylor Otwell
7b17f5f326 use short closure 2022-08-20 12:22:43 -05:00
Taylor Otwell
0c3d1fabe5 use global functino 2022-06-22 11:02:43 -05:00
Choraimy Kroonstuiver
6479a60e95
Improve typing on user factory 2022-02-09 21:24:35 +01:00
Craig Morris
1db81e7e8c use FQN 2022-01-21 12:32:08 +00:00
Craig Morris
4c94086856 switch to extends 2022-01-21 12:21:38 +00:00
Craig Morris
7bff7c6c61 add type to UserFactory for generic parent class 2022-01-21 12:12:45 +00:00
Nuno Maduro
9915831d22
Guess database factory model by default (#5713) 2021-10-22 13:11:06 -05:00
JuanDMeGon
0e8e9a0727
[8.x] Using faker method instead of properties (#5583)
After Faker PHP 1.14 using properties is deprecated and is recommended to use methods instead.
2021-04-13 07:28:01 -05:00
Taylor Otwell
ebf2646c34 wip 2021-02-16 10:58:35 -06:00
Jared Lewis
eaf7289523
Add unverified state to UserFactory (#5533) 2021-02-09 14:52:23 -06:00
Taylor Otwell
710d472d76 models directory 2020-08-20 15:31:07 -05:00
Taylor Otwell
c3f7dd9af8 fix doc block 2020-05-18 10:20:51 -05:00
Taylor Otwell
5f6f5c929b add model 2020-04-21 12:41:27 -05:00
Taylor Otwell
b9af2b2294 Use new factories
Use the new factories provided in 8.x
2020-04-21 10:12:39 -05:00
Graham Campbell
5df3b7b1fe Revert "Apply fixes from StyleCI (#5006)"
This reverts commit 50176732d66b197de62d5567b79fc77f63e2cfbd.
2019-12-31 12:21:39 +00:00
Dries Vints
e656932002 Apply fixes from StyleCI (#5100) 2019-09-10 17:26:00 +02:00
Taylor Otwell
50176732d6
Apply fixes from StyleCI (#5006) 2019-04-24 07:38:42 -05:00
Stefan Bauer
12a4885a47 Fix phpdoc to order by syntax convention (#5005)
Reorder the `@var` phpdoc syntax by convention, see http://docs.phpdoc.org/references/phpdoc/tags/var.html
2019-04-24 07:38:18 -05:00
Sjors Ottjes
ef1ce665ee
Update UserFactory.php 2019-04-14 13:30:53 +02:00
Dries Vints
fae44eeb26
Replace string helper 2019-02-12 16:53:41 +01:00
Taylor Otwell
3959c09f3b import class 2018-12-18 09:07:33 -06:00
Taylor Otwell
4070dc98d4 fix conflicts 2018-12-18 09:06:40 -06:00
Kushal
9db658d6d1
Update UserFactory password in line with #4794
The new password is of 8 characters, as required by #4794
2018-10-06 23:17:02 +05:30
Gaurav Makhecha
62c5bbf820
Seeded users should be verified by default
the email_verified_at column value is used to determine whether a user has verified her account.
2018-09-15 10:14:06 +05:30
Sjors Ottjes
c3d3dc1403
Add comment with the value of the hashed password 2017-12-21 17:00:07 +01:00
Taylor Otwell
f693a20a3c just use hard-coded hash 2017-12-20 07:49:07 -06:00
Taylor Otwell
c5add7ab72 simplify factory 2017-05-06 15:28:45 -04:00
Taylor Otwell
c161b14ee0 Apply fixes from StyleCI 2017-04-11 15:43:42 +00:00
Taylor Otwell
67a8a11570 rename ModelFactory to UserFactory to encourage separate files 2017-04-11 10:41:19 -05:00
ARCANEDEV
f699e710ad Fixing typehint 2016-10-07 23:31:23 +01:00
Taylor Otwell
a37215d044 fix spacing 2016-10-07 16:39:42 -05:00
Barry vd. Heuvel
93e078a79d Add typehint for Factory 2016-10-07 15:08:41 +02:00
Kai Rienow
dcf971805d Add unique modifier 2016-09-20 08:23:40 +02:00
Adam Wathan
3435710575 Use implicit null instead of explicit 2016-08-21 14:29:10 +02:00
Adam Wathan
792dcd48c8 Compute hash only once and store in static variable 2016-08-21 14:23:50 +02:00
Adam Wathan
b041a03878 Use precomputed hash instead of bcrypt in ModelFactory 2016-08-21 12:31:02 +02:00
Martin Bean
00e5c4465c Use safeEmail instead
Faker’s `email` method can accidentally generate email addresses. This ensures “safe” addresses are only ever generated by the factory, to avoid spamming actual mailboxes if mail was sent in a loop etc.
2016-02-16 12:02:26 +00:00
Duilio Palacios
83ffbc65d1 Using the bcrypt function in users generated by the model factory 2015-07-13 16:05:37 +00:00
Andrew
037769e1aa remove leading slash
requested by project maintainer
2015-07-07 15:44:15 -05:00
Andrew
7bb1326535 type hint faker generator
allow IDE to help with autocompletion
2015-07-07 14:47:02 -05:00
Pantelis Peslis
16e37cb370 Use the ::class notation 2015-06-08 10:29:33 +03:00
Taylor Otwell
9a6c3df7a0 Use define syntax. 2015-05-09 16:43:45 -05:00
Taylor Otwell
fdf6dd7c20 Stub factory. 2015-05-08 08:42:04 -05:00