-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_test.php
More file actions
38 lines (30 loc) · 973 Bytes
/
user_test.php
File metadata and controls
38 lines (30 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
require_once 'User.php';
// $user = new User();
// $user->name = 'Bob Harris';
// $user->email = 'bobharris@callmebob.org';
// $user->password = password_hash('secret', PASSWORD_DEFAULT);
// $user->save();
// $user = User::find(1);
// $user->name = 'Bob Robertson';
// $user->email = 'bob@bob.com';
// $user->password = password_hash('mysupersecret', PASSWORD_DEFAULT);
// $user->save();
// $user = new User();
// $user->name = 'Bob Johnson';
// $user->email = 'bobjohnson@bob.org';
// $user->password = password_hash('youwillneverguess', PASSWORD_DEFAULT);
// $user->save();
// $user = new User();
// $user->name = 'Bob Smith';
// $user->email = 'bobsmith@thebob.com';
// $user->password = password_hash('mynameisbob', PASSWORD_DEFAULT);
// $user->save();
// foreach (User::all() as $user) {
// echo 'ID: ' . $user->id . PHP_EOL,
// 'Name: ' . $user->name . PHP_EOL,
// 'Email: ' . $user->email . PHP_EOL;
// }
$user = User::find(1);
$user->delete();
?>