@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | * to preform actions like (add, edit ... etc). |
14 | 14 | * @var string |
15 | 15 | */ |
16 | - protected $model = 'users'; |
|
16 | + protected $model = 'users'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * List of all route actions that the base api controller |
@@ -27,14 +27,14 @@ discard block |
||
27 | 27 | * will skip login check for them. |
28 | 28 | * @var array |
29 | 29 | */ |
30 | - protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken']; |
|
30 | + protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken']; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * The validations rules used by the base api controller |
34 | 34 | * to check before add. |
35 | 35 | * @var array |
36 | 36 | */ |
37 | - protected $validationRules = [ |
|
37 | + protected $validationRules = [ |
|
38 | 38 | 'name' => 'nullable|string', |
39 | 39 | 'email' => 'required|email|unique:users,email,{id}', |
40 | 40 | 'password' => 'nullable|min:6' |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | { |
250 | 250 | $this->validate($request, [ |
251 | 251 | 'name' => 'nullable|string', |
252 | - 'email' => 'required|email|unique:users,email,' . \Auth::id() |
|
252 | + 'email' => 'required|email|unique:users,email,'.\Auth::id() |
|
253 | 253 | ]); |
254 | 254 | |
255 | 255 | return \Response::json($this->repo->saveProfile($request->only('name', 'email')), 200); |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * to preform actions like (add, edit ... etc). |
14 | 14 | * @var string |
15 | 15 | */ |
16 | - protected $model = 'oauthClients'; |
|
16 | + protected $model = 'oauthClients'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The validations rules used by the base api controller |
20 | 20 | * to check before add. |
21 | 21 | * @var array |
22 | 22 | */ |
23 | - protected $validationRules = [ |
|
23 | + protected $validationRules = [ |
|
24 | 24 | 'name' => 'required|max:255', |
25 | 25 | 'redirect' => 'required|url', |
26 | 26 | 'user_id' => 'required|exists:users,id', |
@@ -20,27 +20,27 @@ discard block |
||
20 | 20 | ], |
21 | 21 | [ |
22 | 22 | 'title' => 'email equal [email protected] and user is blocked:', |
23 | - 'content' => ['and' => ['email' => '[email protected]','blocked' => 1]] |
|
23 | + 'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]] |
|
24 | 24 | ], |
25 | 25 | [ |
26 | 26 | 'title' => 'email equal [email protected] or user is blocked:', |
27 | - 'content' => ['or' => ['email' => '[email protected]','blocked' => 1]] |
|
27 | + 'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]] |
|
28 | 28 | ], |
29 | 29 | [ |
30 | 30 | 'title' => 'email contain John:', |
31 | - 'content' => ['email' => ['op' => 'like','val' => '%John%']] |
|
31 | + 'content' => ['email' => ['op' => 'like', 'val' => '%John%']] |
|
32 | 32 | ], |
33 | 33 | [ |
34 | 34 | 'title' => 'user created after 2016-10-25:', |
35 | - 'content' => ['created_at' => ['op' => '>','val' => '2016-10-25']] |
|
35 | + 'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']] |
|
36 | 36 | ], |
37 | 37 | [ |
38 | 38 | 'title' => 'user created between 2016-10-20 and 2016-10-25:', |
39 | - 'content' => ['created_at' => ['op' => 'between','val1' => '2016-10-20','val2' => '2016-10-25']] |
|
39 | + 'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']] |
|
40 | 40 | ], |
41 | 41 | [ |
42 | 42 | 'title' => 'user id in 1,2,3:', |
43 | - 'content' => ['id' => ['op' => 'in','val' => [1, 2, 3]]] |
|
43 | + 'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]] |
|
44 | 44 | ], |
45 | 45 | [ |
46 | 46 | 'title' => 'user name is null:', |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ], |
53 | 53 | [ |
54 | 54 | 'title' => 'user has group admin:', |
55 | - 'content' => ['groups' => ['op' => 'has','val' => ['name' => 'Admin']]] |
|
55 | + 'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]] |
|
56 | 56 | ] |
57 | 57 | ]; |
58 | 58 |