-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexamples.php
More file actions
56 lines (45 loc) · 1.06 KB
/
examples.php
File metadata and controls
56 lines (45 loc) · 1.06 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
include_once('controller.php');
$new_user = array(
'user' => array(
'login' => 'yoyo',
'email' => 'yoyo@123.com',
'mobile' => '3052221123',
'first_name' => 'Joe',
'last_name' => 'Smith',
'birth_year' => '1974',
'gender' => 'male',
'address' => '123 home st',
'address2' => 'suite 3',
'state' => 'FL',
'city' => 'Hollywood',
'zip' => '33301',
'income' => '55000',
'sms' => '1',
'newsletter' => '1',
'mac' => '00:0a:10:00:00',
'agreed_to_terms' => '1'
#'created_at' => '',
#'home' => '',
)
);
$search_params = array(
'mobile' => '3052221123'
);
$update_params = array(
'user' => array(
'mobile' => '5552221123'
)
);
$user = new UserResource;
// User All
$all_users = $user->all();
// User create
#$response = $user->create($new_user);
// User search
//$x = $user->search($search_params);
// User update
#$response = $user->update($update_params);
// User destroy
print_r($all_users);
?>