Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | protected function run($model): void |
||
26 | { |
||
27 | $password = 'password'; |
||
28 | $hashedPassword = sodium_crypto_pwhash_str( |
||
29 | $password, |
||
30 | SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, |
||
31 | SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE |
||
32 | ); |
||
33 | |||
34 | $model::create([ |
||
35 | 'name' => 'admin', |
||
36 | 'email' => '[email protected]', |
||
37 | 'password' => $hashedPassword, |
||
38 | 'is_admin' => true, |
||
39 | ]); |
||
40 | |||
41 | $model::create([ |
||
42 | 'name' => 'user', |
||
43 | 'email' => '[email protected]', |
||
44 | 'password' => $hashedPassword, |
||
45 | ]); |
||
48 |