@@ -31,16 +31,16 @@ discard block |
||
31 | 31 | |
32 | 32 | $viewData = array(); |
33 | 33 | |
34 | - if(Input::has('conversation')) { |
|
34 | + if (Input::has('conversation')) { |
|
35 | 35 | $viewData['current_conversation'] = $this->conversationRepository->getByName(Input::get('conversation')); |
36 | 36 | } else { |
37 | 37 | $viewData['current_conversation'] = Auth::user()->conversations()->first(); |
38 | 38 | } |
39 | 39 | |
40 | - if($viewData['current_conversation']) { |
|
40 | + if ($viewData['current_conversation']) { |
|
41 | 41 | Session::set('current_conversation', $viewData['current_conversation']->name); |
42 | 42 | |
43 | - foreach($viewData['current_conversation']->messages_notifications as $notification) { |
|
43 | + foreach ($viewData['current_conversation']->messages_notifications as $notification) { |
|
44 | 44 | $notification->read = true; |
45 | 45 | $notification->save(); |
46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $users = $this->userRepository->getAllExcept(Auth::user()->id); |
50 | 50 | |
51 | - foreach($users as $key => $user) { |
|
51 | + foreach ($users as $key => $user) { |
|
52 | 52 | $viewData['recipients'][$user->id] = $user->username; |
53 | 53 | } |
54 | 54 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | class VideoChatController extends AuthController { |
4 | 4 | |
5 | 5 | |
6 | - public function video() { |
|
6 | + public function video() { |
|
7 | 7 | if (Auth::user()) { |
8 | 8 | |
9 | 9 |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | $userDetailsArray = array(); |
12 | 12 | $userDetailsArray = $value; |
13 | 13 | } |
14 | - // print_r($userDetailsArray); |
|
15 | - $data['userDetailsArray']=$userDetailsArray; |
|
14 | + // print_r($userDetailsArray); |
|
15 | + $data['userDetailsArray']=$userDetailsArray; |
|
16 | 16 | return View::make('layouts/profile')->with("userDetailsArray", $userDetailsArray); |
17 | 17 | } |
18 | 18 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | , 'last_name' => Input::get('last_name'), 'email' => Input::get('email'), 'contact' => Input::get('contact') |
44 | 44 | ) |
45 | 45 | ); |
46 | - return Redirect::to('/view_profile/'.Auth::user()->id); |
|
46 | + return Redirect::to('/view_profile/'.Auth::user()->id); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function updateProfilePicture() { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | // Redirect with a helpful message to inform the user that |
70 | 70 | // the provided file was not an adequate type |
71 | 71 | // return Redirect::back()->withErrors(['Error: The provided file was not an image', 'Error: The provided file was not an image']); |
72 | - return Redirect::back()->withErrors($validator); |
|
72 | + return Redirect::back()->withErrors($validator); |
|
73 | 73 | //print_r('Error: The provided file was not an image'); |
74 | 74 | // return Redirect::to('/')->with('message', 'Error: The provided file was not an image'); |
75 | 75 | } else { |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | return Redirect::route('main'); |
98 | 98 | } |
99 | 99 | |
100 | - public function updatePassword() { |
|
101 | - $input = Input::all(); |
|
102 | - $rules = array( |
|
103 | - 'current_password' => 'required', |
|
100 | + public function updatePassword() { |
|
101 | + $input = Input::all(); |
|
102 | + $rules = array( |
|
103 | + 'current_password' => 'required', |
|
104 | 104 | |
105 | - 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/', |
|
105 | + 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/', |
|
106 | 106 | 'password_confirm' => 'required|same:password' |
107 | 107 | ); |
108 | 108 | |
@@ -111,19 +111,19 @@ discard block |
||
111 | 111 | // Check to see if validation fails or passes |
112 | 112 | if ($validator->fails()) { |
113 | 113 | |
114 | - return Redirect::back()->withErrors($validator); |
|
114 | + return Redirect::back()->withErrors($validator); |
|
115 | 115 | } else { |
116 | - $password= Hash::make(Input::get('new_password')); |
|
116 | + $password= Hash::make(Input::get('new_password')); |
|
117 | 117 | DB::table('users')->where('id', Auth::user()->id)->update(array( |
118 | 118 | 'password' => $password |
119 | 119 | ) |
120 | 120 | ); |
121 | 121 | } |
122 | - return Redirect::to('/settings/'); |
|
122 | + return Redirect::to('/settings/'); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | function deactivateAccount(){ |
126 | - if (Auth::user()) { |
|
126 | + if (Auth::user()) { |
|
127 | 127 | $loggedInUser=Auth::user()->id; |
128 | 128 | $userProfile = DB::table('users')->select('profile_pic')->where('id', Auth::user()->id)->get(); |
129 | 129 | foreach ($userProfile as $key => $value) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $affected = DB::table('users')->where('id', '=', $loggedInUser)->delete(); |
140 | 140 | // @unlink('fusionmate/public/plugins/userUploads/' . $userDetailsArray['profile_pic']); |
141 | 141 | return Redirect::route('main'); |
142 | - } |
|
142 | + } |
|
143 | 143 | |
144 | 144 | |
145 | 145 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $userDetailsArray = $value; |
13 | 13 | } |
14 | 14 | // print_r($userDetailsArray); |
15 | - $data['userDetailsArray']=$userDetailsArray; |
|
15 | + $data['userDetailsArray'] = $userDetailsArray; |
|
16 | 16 | return View::make('layouts/profile')->with("userDetailsArray", $userDetailsArray); |
17 | 17 | } |
18 | 18 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | return Redirect::back()->withErrors($validator); |
115 | 115 | } else { |
116 | - $password= Hash::make(Input::get('new_password')); |
|
116 | + $password = Hash::make(Input::get('new_password')); |
|
117 | 117 | DB::table('users')->where('id', Auth::user()->id)->update(array( |
118 | 118 | 'password' => $password |
119 | 119 | ) |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | return Redirect::to('/settings/'); |
123 | 123 | } |
124 | 124 | |
125 | - function deactivateAccount(){ |
|
125 | + function deactivateAccount() { |
|
126 | 126 | if (Auth::user()) { |
127 | - $loggedInUser=Auth::user()->id; |
|
127 | + $loggedInUser = Auth::user()->id; |
|
128 | 128 | $userProfile = DB::table('users')->select('profile_pic')->where('id', Auth::user()->id)->get(); |
129 | 129 | foreach ($userProfile as $key => $value) { |
130 | 130 | $userDetailsArray = $value; |
@@ -53,20 +53,20 @@ discard block |
||
53 | 53 | |
54 | 54 | |
55 | 55 | if(Input::get('token')!=''){ |
56 | - $rules = array( |
|
57 | - 'email' => 'required|email', |
|
58 | - 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/' |
|
59 | - ); |
|
60 | - $messages = array( |
|
56 | + $rules = array( |
|
57 | + 'email' => 'required|email', |
|
58 | + 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/' |
|
59 | + ); |
|
60 | + $messages = array( |
|
61 | 61 | 'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.', |
62 | 62 | |
63 | 63 | );} |
64 | 64 | else{ |
65 | - $rules = array( |
|
65 | + $rules = array( |
|
66 | 66 | 'email' => 'required|email', |
67 | 67 | 'password' => 'required' |
68 | 68 | ); |
69 | - $messages = array( |
|
69 | + $messages = array( |
|
70 | 70 | 'password.regex' => 'Invalid Username/Password', |
71 | 71 | |
72 | 72 | ); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | DB::table('team_channel_users')->insert( |
99 | 99 | ['team_channel_name_id' => $result['team_id'], 'user_id' => $id] |
100 | 100 | ); |
101 | - //delete token from database before creating invited account |
|
101 | + //delete token from database before creating invited account |
|
102 | 102 | DB::table('invitation_token')->where('token', '=', $token)->delete(); |
103 | 103 | $this->teamRepository->updateNewMemberJoinNotification($result['team_id'],$id); |
104 | 104 | } |
@@ -135,10 +135,10 @@ discard block |
||
135 | 135 | ), 200); |
136 | 136 | } |
137 | 137 | else{ |
138 | - $errorMsg = array( |
|
138 | + $errorMsg = array( |
|
139 | 139 | 'errormsg' => 'Invalid Email or Password' |
140 | 140 | ); |
141 | - return Response::json(array( |
|
141 | + return Response::json(array( |
|
142 | 142 | 'success' => false, |
143 | 143 | 'errors' => $errorMsg, |
144 | 144 | 400 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // )); |
53 | 53 | |
54 | 54 | |
55 | - if(Input::get('token')!=''){ |
|
55 | + if (Input::get('token') != '') { |
|
56 | 56 | $rules = array( |
57 | 57 | 'email' => 'required|email', |
58 | 58 | 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/' |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | $messages = array( |
61 | 61 | 'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.', |
62 | 62 | |
63 | - );} |
|
64 | - else{ |
|
63 | + ); } |
|
64 | + else { |
|
65 | 65 | $rules = array( |
66 | 66 | 'email' => 'required|email', |
67 | 67 | 'password' => 'required' |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | - $validator = Validator::make(Input::all(), $rules,$messages); |
|
76 | + $validator = Validator::make(Input::all(), $rules, $messages); |
|
77 | 77 | |
78 | 78 | if ($validator->fails()) { |
79 | 79 | return Response::json(array( |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | if ($token != '') { |
87 | 87 | |
88 | 88 | $result = DB::table('invitation_token')->where('token', '=', $token)->first(); |
89 | - if (count($result)>0) {//token was valid and was deleted |
|
89 | + if (count($result) > 0) {//token was valid and was deleted |
|
90 | 90 | //Create invited account |
91 | - $userInfo=explode('@',$result['email']); |
|
91 | + $userInfo = explode('@', $result['email']); |
|
92 | 92 | $id = DB::table('users')->insertGetId( |
93 | 93 | ['first_name' => $userInfo[0], 'last_name' => '', 'email' => $result['email'], 'password' => Hash::make(Input::get('password'))] |
94 | 94 | ); |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | ); |
101 | 101 | //delete token from database before creating invited account |
102 | 102 | DB::table('invitation_token')->where('token', '=', $token)->delete(); |
103 | - $this->teamRepository->updateNewMemberJoinNotification($result['team_id'],$id); |
|
103 | + $this->teamRepository->updateNewMemberJoinNotification($result['team_id'], $id); |
|
104 | 104 | } |
105 | - else{ |
|
105 | + else { |
|
106 | 106 | return Response::json(array( |
107 | 107 | 'success' => false, |
108 | 108 | 'errors' => "Invalid Request", |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | 'success' => true |
135 | 135 | ), 200); |
136 | 136 | } |
137 | - else{ |
|
137 | + else { |
|
138 | 138 | $errorMsg = array( |
139 | 139 | 'errormsg' => 'Invalid Email or Password' |
140 | 140 | ); |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | foreach ($teamMembers as $memeber) { |
194 | 194 | //Publish data to redis |
195 | - $channelId = $memeber["id"] . "_" . $values["team_channel_id"]; |
|
195 | + $channelId = $memeber["id"]."_".$values["team_channel_id"]; |
|
196 | 196 | |
197 | 197 | $teamChannelId = $values["team_channel_id"]; |
198 | 198 | $data = array( |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
207 | - public function updateTimeZone(){ |
|
208 | - $tzName=Input::get('tz'); |
|
207 | + public function updateTimeZone() { |
|
208 | + $tzName = Input::get('tz'); |
|
209 | 209 | |
210 | 210 | |
211 | 211 | storeUserTimeZone($tzName); |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | $messages = array( |
61 | 61 | 'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.', |
62 | 62 | |
63 | - );} |
|
64 | - else{ |
|
63 | + );} else{ |
|
65 | 64 | $rules = array( |
66 | 65 | 'email' => 'required|email', |
67 | 66 | 'password' => 'required' |
@@ -101,8 +100,7 @@ discard block |
||
101 | 100 | //delete token from database before creating invited account |
102 | 101 | DB::table('invitation_token')->where('token', '=', $token)->delete(); |
103 | 102 | $this->teamRepository->updateNewMemberJoinNotification($result['team_id'],$id); |
104 | - } |
|
105 | - else{ |
|
103 | + } else{ |
|
106 | 104 | return Response::json(array( |
107 | 105 | 'success' => false, |
108 | 106 | 'errors' => "Invalid Request", |
@@ -133,8 +131,7 @@ discard block |
||
133 | 131 | return Response::json(array( |
134 | 132 | 'success' => true |
135 | 133 | ), 200); |
136 | - } |
|
137 | - else{ |
|
134 | + } else{ |
|
138 | 135 | $errorMsg = array( |
139 | 136 | 'errormsg' => 'Invalid Email or Password' |
140 | 137 | ); |
@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | |
5 | 5 | public function registerUser() { |
6 | 6 | |
7 | - $input = Input::only(array( |
|
8 | - 'firstName', |
|
9 | - 'lastName', |
|
7 | + $input = Input::only(array( |
|
8 | + 'firstName', |
|
9 | + 'lastName', |
|
10 | 10 | 'email', |
11 | 11 | 'password', |
12 | - 'role' |
|
12 | + 'role' |
|
13 | 13 | )); |
14 | 14 | |
15 | 15 | |
@@ -20,12 +20,12 @@ discard block |
||
20 | 20 | 'password' => 'required|min:6|regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{1,}$/', |
21 | 21 | 'role' => 'required' |
22 | 22 | ); |
23 | - $messages = array( |
|
23 | + $messages = array( |
|
24 | 24 | 'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.', |
25 | 25 | |
26 | 26 | ); |
27 | 27 | $validator = Validator::make($input, $rules,$messages); |
28 | - $messages = $validator->messages(); |
|
28 | + $messages = $validator->messages(); |
|
29 | 29 | if($validator->fails()) { |
30 | 30 | |
31 | 31 | return Response::json(array( |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | DB::table('user_roles')->insert( |
42 | 42 | ['user_id' => $id, 'role_id' => Input::get('role')] |
43 | 43 | ); |
44 | - $channelId= Hash::make(Input::get('password')); |
|
45 | - DB::table('channels')->insert( |
|
44 | + $channelId= Hash::make(Input::get('password')); |
|
45 | + DB::table('channels')->insert( |
|
46 | 46 | ['channel_name' => $channelId, 'author_id' => $id] |
47 | 47 | ); |
48 | 48 | if (Auth::attempt(array('email' => Input::get('email'), 'password' => Input::get('password')),true)) { |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | Session::put('profilePic', Auth::user()->profile_pic); |
63 | 63 | Session::put('role', $role['role_id']); |
64 | 64 | Session::put('channelId', $channelName['id']); |
65 | - return Response::json(array( |
|
65 | + return Response::json(array( |
|
66 | 66 | 'success' => "ok" |
67 | 67 | ), 200); |
68 | 68 | |
69 | 69 | } |
70 | - return Response::json(array( |
|
70 | + return Response::json(array( |
|
71 | 71 | 'success' => "notok" |
72 | 72 | ), 400); |
73 | 73 |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | 'password.regex' => 'The password must containt atleast 1 Upper Case letters[A-Z],1 Lower Case Letter[a-z],1 numeric letter [0-9] and 1 special character.', |
25 | 25 | |
26 | 26 | ); |
27 | - $validator = Validator::make($input, $rules,$messages); |
|
27 | + $validator = Validator::make($input, $rules, $messages); |
|
28 | 28 | $messages = $validator->messages(); |
29 | - if($validator->fails()) { |
|
29 | + if ($validator->fails()) { |
|
30 | 30 | |
31 | 31 | return Response::json(array( |
32 | 32 | 'success' => false, |
@@ -36,16 +36,16 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $id = DB::table('users')->insertGetId( |
39 | - ['first_name' => Input::get('firstName'),'last_name' => Input::get('lastName'),'email' => Input::get('email'), 'password' => Hash::make(Input::get('password'))] |
|
39 | + ['first_name' => Input::get('firstName'), 'last_name' => Input::get('lastName'), 'email' => Input::get('email'), 'password' => Hash::make(Input::get('password'))] |
|
40 | 40 | ); |
41 | 41 | DB::table('user_roles')->insert( |
42 | 42 | ['user_id' => $id, 'role_id' => Input::get('role')] |
43 | 43 | ); |
44 | - $channelId= Hash::make(Input::get('password')); |
|
44 | + $channelId = Hash::make(Input::get('password')); |
|
45 | 45 | DB::table('channels')->insert( |
46 | 46 | ['channel_name' => $channelId, 'author_id' => $id] |
47 | 47 | ); |
48 | - if (Auth::attempt(array('email' => Input::get('email'), 'password' => Input::get('password')),true)) { |
|
48 | + if (Auth::attempt(array('email' => Input::get('email'), 'password' => Input::get('password')), true)) { |
|
49 | 49 | |
50 | 50 | /* Store basic information in session of logged in user */ |
51 | 51 | $role = DB::table('roles') |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $unReadMessages = DB::table('messages') |
12 | 12 | ->select(DB::raw('count(from_user_id) as fromCount'), 'personal_conversations.*','team_channels.id as team_id', 'messages.*', 'users_from.first_name as from_first_name', 'users_from.first_name as from_last_name') |
13 | 13 | ->leftJoin('personal_conversations', 'messages.id', '=', 'personal_conversations.message_id') |
14 | - ->leftJoin('team_channels', 'team_channels.id', '=', 'personal_conversations.team_channel_id') |
|
14 | + ->leftJoin('team_channels', 'team_channels.id', '=', 'personal_conversations.team_channel_id') |
|
15 | 15 | ->leftJoin('users as users_from', 'users_from.id', '=', 'personal_conversations.from_user_id') |
16 | 16 | ->where('personal_conversations.read_status', '=', 1) |
17 | 17 | ->where('personal_conversations.to_user_id', '=', Auth::user()->id)->groupBy('from_user_id')->orderBy('messages.id', 'desc')->get(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ->leftJoin('team_channels', 'team_channels.id', '=', 'invitation_notification.team_id') |
39 | 39 | ->leftJoin('users', 'users.id', '=', 'invitation_notification.new_user') |
40 | 40 | ->where('invitation_notification.team_user', '=', Auth::user()->id) |
41 | - ->where('invitation_notification.new_user', '!=', Auth::user()->id) |
|
41 | + ->where('invitation_notification.new_user', '!=', Auth::user()->id) |
|
42 | 42 | ->where('invitation_notification.read_status', '=', 1) |
43 | 43 | ->groupBy('invitation_notification.new_user') |
44 | 44 | ->orderBy('invitation_notification.created_at', 'desc')->get(); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | if ($type == "messages") { |
11 | 11 | $unReadMessages = DB::table('messages') |
12 | - ->select(DB::raw('count(from_user_id) as fromCount'), 'personal_conversations.*','team_channels.id as team_id', 'messages.*', 'users_from.first_name as from_first_name', 'users_from.first_name as from_last_name') |
|
12 | + ->select(DB::raw('count(from_user_id) as fromCount'), 'personal_conversations.*', 'team_channels.id as team_id', 'messages.*', 'users_from.first_name as from_first_name', 'users_from.first_name as from_last_name') |
|
13 | 13 | ->leftJoin('personal_conversations', 'messages.id', '=', 'personal_conversations.message_id') |
14 | 14 | ->leftJoin('team_channels', 'team_channels.id', '=', 'personal_conversations.team_channel_id') |
15 | 15 | ->leftJoin('users as users_from', 'users_from.id', '=', 'personal_conversations.from_user_id') |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | break; |
66 | 66 | case "general": |
67 | - $teamId = explode("_",Input::get('teamId')); |
|
67 | + $teamId = explode("_", Input::get('teamId')); |
|
68 | 68 | |
69 | 69 | DB::table('team_conversations_read_status') |
70 | 70 | ->where('user_id', Auth::user()->id) |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | break; |
74 | 74 | |
75 | 75 | case "join": |
76 | - $teamId = explode("_",Input::get('teamId')); |
|
76 | + $teamId = explode("_", Input::get('teamId')); |
|
77 | 77 | |
78 | 78 | DB::table('invitation_notification') |
79 | 79 | ->where('team_user', Auth::user()->id) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | $conversations = array(); |
14 | 14 | |
15 | - if($conversations_users) { |
|
15 | + if ($conversations_users) { |
|
16 | 16 | $conversations = Conversation::whereIn('id', $conversations_users)->get(); |
17 | 17 | } |
18 | 18 |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | class Register extends \BaseController { |
4 | 4 | |
5 | 5 | public function registerUser() { |
6 | - $input = Input::only(array( |
|
7 | - 'firstName', |
|
8 | - 'lastName', |
|
6 | + $input = Input::only(array( |
|
7 | + 'firstName', |
|
8 | + 'lastName', |
|
9 | 9 | 'email', |
10 | 10 | 'password', |
11 | - 'role' |
|
11 | + 'role' |
|
12 | 12 | )); |
13 | 13 | |
14 | 14 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ); |
22 | 22 | |
23 | 23 | $validator = Validator::make($input, $rules); |
24 | - $messages = $validator->messages(); |
|
24 | + $messages = $validator->messages(); |
|
25 | 25 | if($validator->fails()) { |
26 | 26 | |
27 | 27 | return Response::json(array( |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | DB::table('user_roles')->insert( |
38 | 38 | ['user_id' => $id, 'role_id' => Input::get('role')] |
39 | 39 | ); |
40 | - $channelId= Hash::make(Input::get('password')); |
|
41 | - DB::table('channels')->insert( |
|
40 | + $channelId= Hash::make(Input::get('password')); |
|
41 | + DB::table('channels')->insert( |
|
42 | 42 | ['channel_name' => $channelId, 'author_id' => $id] |
43 | 43 | ); |
44 | 44 | return View::make('templates/greeting')->with('message', "Account created successfully.You can now log in.Have a great day!"); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | $validator = Validator::make($input, $rules); |
24 | 24 | $messages = $validator->messages(); |
25 | - if($validator->fails()) { |
|
25 | + if ($validator->fails()) { |
|
26 | 26 | |
27 | 27 | return Response::json(array( |
28 | 28 | 'success' => false, |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | $id = DB::table('users')->insertGetId( |
35 | - ['first_name' => Input::get('firstName'),'last_name' => Input::get('lastName'),'email' => Input::get('email'), 'password' => Hash::make(Input::get('password'))] |
|
35 | + ['first_name' => Input::get('firstName'), 'last_name' => Input::get('lastName'), 'email' => Input::get('email'), 'password' => Hash::make(Input::get('password'))] |
|
36 | 36 | ); |
37 | 37 | DB::table('user_roles')->insert( |
38 | 38 | ['user_id' => $id, 'role_id' => Input::get('role')] |
39 | 39 | ); |
40 | - $channelId= Hash::make(Input::get('password')); |
|
40 | + $channelId = Hash::make(Input::get('password')); |
|
41 | 41 | DB::table('channels')->insert( |
42 | 42 | ['channel_name' => $channelId, 'author_id' => $id] |
43 | 43 | ); |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | return View::make('templates/greeting')->with('info', $result); |
40 | 40 | } |
41 | 41 | |
42 | - /** |
|
43 | - * @function creates task |
|
42 | + /** |
|
43 | + * @function creates task |
|
44 | 44 | @param null |
45 | 45 | @return null |
46 | - */ |
|
46 | + */ |
|
47 | 47 | public function create_task() { |
48 | 48 | $result = $this->taskRepository->createTask(); |
49 | 49 | return $result; |
@@ -82,21 +82,21 @@ discard block |
||
82 | 82 | return $result; |
83 | 83 | } |
84 | 84 | |
85 | - /** |
|
86 | - * @function filter dashboard data |
|
85 | + /** |
|
86 | + * @function filter dashboard data |
|
87 | 87 | @param null |
88 | 88 | @return array dashboard data |
89 | - */ |
|
89 | + */ |
|
90 | 90 | public function filter_dashboard() { |
91 | 91 | $result = $this->taskRepository->filterDashboard(); |
92 | 92 | return $result; |
93 | 93 | } |
94 | 94 | |
95 | - /** |
|
96 | - * @function filter grid data |
|
95 | + /** |
|
96 | + * @function filter grid data |
|
97 | 97 | @param null |
98 | 98 | @return array grid data |
99 | - */ |
|
99 | + */ |
|
100 | 100 | public function filter_grid() { |
101 | 101 | $page = \Input::get('current'); |
102 | 102 | $rowCount = \Input::get('rowCount'); |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | $total=''; |
105 | 105 | $result = $this->taskRepository->filterGrid(); |
106 | 106 | foreach($result as $values){ |
107 | - $rows[]=array('un_id'=>$values['un_id'], |
|
107 | + $rows[]=array('un_id'=>$values['un_id'], |
|
108 | 108 | 'priority_name'=>$values['priority_name'], |
109 | 109 | 'status_name'=>$values['status_name'], |
110 | 110 | 'tracker'=>$values['tracker'], |
111 | 111 | 'assignee'=>$values['first_name']." ".$values['last_name'], |
112 | 112 | 'created_at'=>$values['created_at'], |
113 | 113 | 'start_date'=>$values['start_date'], |
114 | - 'end_date'=>$values['end_date']) ; |
|
114 | + 'end_date'=>$values['end_date']) ; |
|
115 | 115 | } |
116 | 116 | $data=array('current'=>$page,'rowCount'=>$rowCount,'rows'=>$rows,'total'=>count($rows)); |
117 | 117 | return json_encode($data); |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | |
144 | - /** @function list of previous updates on a task |
|
144 | + /** @function list of previous updates on a task |
|
145 | 145 | @param task parent id |
146 | 146 | @return html view |
147 | - */ |
|
147 | + */ |
|
148 | 148 | public function get_project_teams() { |
149 | 149 | $result=$this->taskRepository->getProjectTeams(Input::get('projectId')); |
150 | 150 | $data=''; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $trackers = $this->taskRepository->getTracker(); |
25 | 25 | $status = $this->taskRepository->getStatus(); |
26 | 26 | $priotities = $this->taskRepository->getPriorities(); |
27 | - $data = array("teams" => $teams, "projects" => $projects,"trackers"=>$trackers,"status"=>$status,"priorities"=>$priotities); |
|
27 | + $data = array("teams" => $teams, "projects" => $projects, "trackers"=>$trackers, "status"=>$status, "priorities"=>$priotities); |
|
28 | 28 | |
29 | 29 | return View::make('templates/task/dashboard')->with('data', $data); |
30 | 30 | } |
@@ -56,20 +56,20 @@ discard block |
||
56 | 56 | @return null |
57 | 57 | */ |
58 | 58 | public function get_members() { |
59 | - $enTeamId=Input::get("teamId"); |
|
60 | - $teamId=$this->teamRepository->getTeamDecodedId($enTeamId); |
|
59 | + $enTeamId = Input::get("teamId"); |
|
60 | + $teamId = $this->teamRepository->getTeamDecodedId($enTeamId); |
|
61 | 61 | $members = $this->teamRepository->getMembers($teamId); |
62 | 62 | /* |
63 | 63 | * Prepare html select options |
64 | 64 | */ |
65 | 65 | |
66 | - $data=''; |
|
67 | - $data.="<option value=''>Select User</option>"; |
|
68 | - foreach($members as $values){ |
|
69 | - $memDetail=explode("_",$values); |
|
70 | - $data.="<option value=".$memDetail[2].">".$memDetail[0]." ".$memDetail[1]."</option>"; |
|
66 | + $data = ''; |
|
67 | + $data .= "<option value=''>Select User</option>"; |
|
68 | + foreach ($members as $values) { |
|
69 | + $memDetail = explode("_", $values); |
|
70 | + $data .= "<option value=".$memDetail[2].">".$memDetail[0]." ".$memDetail[1]."</option>"; |
|
71 | 71 | } |
72 | - return trim($data,'"'); |
|
72 | + return trim($data, '"'); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -101,19 +101,19 @@ discard block |
||
101 | 101 | $page = \Input::get('current'); |
102 | 102 | $rowCount = \Input::get('rowCount'); |
103 | 103 | |
104 | - $total=''; |
|
104 | + $total = ''; |
|
105 | 105 | $result = $this->taskRepository->filterGrid(); |
106 | - foreach($result as $values){ |
|
107 | - $rows[]=array('un_id'=>$values['un_id'], |
|
106 | + foreach ($result as $values) { |
|
107 | + $rows[] = array('un_id'=>$values['un_id'], |
|
108 | 108 | 'priority_name'=>$values['priority_name'], |
109 | 109 | 'status_name'=>$values['status_name'], |
110 | 110 | 'tracker'=>$values['tracker'], |
111 | 111 | 'assignee'=>$values['first_name']." ".$values['last_name'], |
112 | 112 | 'created_at'=>$values['created_at'], |
113 | 113 | 'start_date'=>$values['start_date'], |
114 | - 'end_date'=>$values['end_date']) ; |
|
114 | + 'end_date'=>$values['end_date']); |
|
115 | 115 | } |
116 | - $data=array('current'=>$page,'rowCount'=>$rowCount,'rows'=>$rows,'total'=>count($rows)); |
|
116 | + $data = array('current'=>$page, 'rowCount'=>$rowCount, 'rows'=>$rows, 'total'=>count($rows)); |
|
117 | 117 | return json_encode($data); |
118 | 118 | } |
119 | 119 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $priotities = $this->taskRepository->getPriorities(); |
128 | 128 | $taskData = $this->taskRepository->getTaskData(); |
129 | 129 | $members = $this->teamRepository->getMembers($taskData['team_id']); |
130 | - $data = array("trackers"=>$trackers,"status"=>$status,"priorities"=>$priotities,'members'=>$members,'task_data'=>$taskData); |
|
130 | + $data = array("trackers"=>$trackers, "status"=>$status, "priorities"=>$priotities, 'members'=>$members, 'task_data'=>$taskData); |
|
131 | 131 | return View::make('templates/task/create_task_modal')->with('data', $data); |
132 | 132 | } |
133 | 133 | |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | @return html view |
137 | 137 | */ |
138 | 138 | public function recent_updates($parent_task_id) { |
139 | - $result=$this->taskRepository->getUpdates($parent_task_id); |
|
140 | - return View::make('templates/task/recent_task_updates')->with("result",$result); |
|
139 | + $result = $this->taskRepository->getUpdates($parent_task_id); |
|
140 | + return View::make('templates/task/recent_task_updates')->with("result", $result); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -146,13 +146,13 @@ discard block |
||
146 | 146 | @return html view |
147 | 147 | */ |
148 | 148 | public function get_project_teams() { |
149 | - $result=$this->taskRepository->getProjectTeams(Input::get('projectId')); |
|
150 | - $data=''; |
|
151 | - $data.="<option value=''>Select Team</option>"; |
|
152 | - foreach($result as $teamDetail){ |
|
149 | + $result = $this->taskRepository->getProjectTeams(Input::get('projectId')); |
|
150 | + $data = ''; |
|
151 | + $data .= "<option value=''>Select Team</option>"; |
|
152 | + foreach ($result as $teamDetail) { |
|
153 | 153 | |
154 | - $data.="<option value=".$teamDetail['team_channel_id'].">".$teamDetail['channel_view_name']."</option>"; |
|
154 | + $data .= "<option value=".$teamDetail['team_channel_id'].">".$teamDetail['channel_view_name']."</option>"; |
|
155 | 155 | } |
156 | - return trim($data,'"'); |
|
156 | + return trim($data, '"'); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | \ No newline at end of file |