@@ -17,38 +17,38 @@ |
||
17 | 17 | public function getMembers($id); |
18 | 18 | |
19 | 19 | |
20 | - /** |
|
21 | - * Decode a team ecnoded Id |
|
22 | - * |
|
23 | - * @param $id |
|
24 | - */ |
|
20 | + /** |
|
21 | + * Decode a team ecnoded Id |
|
22 | + * |
|
23 | + * @param $id |
|
24 | + */ |
|
25 | 25 | public function getTeamDecodedId($id); |
26 | - /** |
|
27 | - * fetch a team name by Id |
|
28 | - * |
|
29 | - * @param $id |
|
30 | - */ |
|
26 | + /** |
|
27 | + * fetch a team name by Id |
|
28 | + * |
|
29 | + * @param $id |
|
30 | + */ |
|
31 | 31 | public function getTeamName($id); |
32 | 32 | |
33 | - /** |
|
34 | - * update a team name by Id |
|
35 | - * |
|
36 | - * @param $id |
|
37 | - */ |
|
33 | + /** |
|
34 | + * update a team name by Id |
|
35 | + * |
|
36 | + * @param $id |
|
37 | + */ |
|
38 | 38 | public function updateTeamName($id); |
39 | 39 | |
40 | - /** |
|
41 | - * update a team head by Id |
|
42 | - * |
|
43 | - * @param $id |
|
44 | - */ |
|
40 | + /** |
|
41 | + * update a team head by Id |
|
42 | + * |
|
43 | + * @param $id |
|
44 | + */ |
|
45 | 45 | public function updateTeamHead($id); |
46 | 46 | |
47 | - /** |
|
48 | - * update a notification |
|
49 | - * |
|
50 | - * @param $id,$teamid |
|
51 | - */ |
|
47 | + /** |
|
48 | + * update a notification |
|
49 | + * |
|
50 | + * @param $id,$teamid |
|
51 | + */ |
|
52 | 52 | public function updateNewMemberJoinNotification($team_id,$user_id); |
53 | 53 | |
54 | 54 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php namespace LaravelRealtimeChat\Repositories\Team; |
2 | 2 | |
3 | -interface TeamRepository { |
|
3 | +interface TeamRepository { |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Fetch a record by id |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @param $id,$teamid |
51 | 51 | */ |
52 | - public function updateNewMemberJoinNotification($team_id,$user_id); |
|
52 | + public function updateNewMemberJoinNotification($team_id, $user_id); |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * get user details |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $teams = \DB::table('channels') |
14 | 14 | ->select('team_channels.id', 'channels.channel_name', 'team_channels.channel_view_name', 'channels.author_id', "team_channels.created_at", 'team_channels.team_channel_id','team_heads.user_id') |
15 | 15 | ->leftJoin('team_channels', 'channels.id', '=', 'team_channels.channel_name_id') |
16 | - ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
|
16 | + ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
|
17 | 17 | ->where('team_channels.id', '!=', '') |
18 | 18 | ->where('channels.id', '=', $id)->distinct()->get(); |
19 | 19 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | ->select('team_channels.channel_view_name', 'team_channels.team_channel_id', 'team_channels.id', 'team_channels.created_at','team_heads.user_id') |
23 | 23 | ->leftJoin('team_channel_users', 'team_channel_users.team_channel_name_id', '=', 'team_channels.id') |
24 | 24 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
25 | - ->where('team_channel_users.user_id', '=', \Auth::user()->id)->distinct()->get(); |
|
25 | + ->where('team_channel_users.user_id', '=', \Auth::user()->id)->distinct()->get(); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | return $teams; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return $team['id']; |
53 | 53 | } |
54 | 54 | |
55 | - public function getTeamName($id) { |
|
55 | + public function getTeamName($id) { |
|
56 | 56 | $team = \DB::table('team_channels') |
57 | 57 | ->select('team_channels.channel_view_name',\DB::raw('CONCAT(users.first_name, " ", users.last_name) AS full_name')) |
58 | 58 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | $teamArr = array(); |
114 | 114 | |
115 | - $details= $this->getUserDetails($user_id); |
|
115 | + $details= $this->getUserDetails($user_id); |
|
116 | 116 | |
117 | 117 | $teamMembers =\DB::table('users') |
118 | 118 | ->select('users.first_name','users.last_name', 'users.id','team_channels.channel_view_name','team_channels.team_channel_id','team_channels.id as team_id_decoded') |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | foreach ($teamMembers as $memeber) { |
124 | 124 | //insert notification |
125 | - $lastId = \DB::table('invitation_notification')->insertGetId( |
|
125 | + $lastId = \DB::table('invitation_notification')->insertGetId( |
|
126 | 126 | ['team_id' => $team_id, "team_user" => $memeber["id"],'new_user'=>$user_id] |
127 | 127 | ); |
128 | 128 | //Publish data to redis |
@@ -135,19 +135,19 @@ discard block |
||
135 | 135 | 'message' => array('new_user_id'=>$user_id,'new_user_channel_id' => $user_id."_".$teamChannelId,'user_id' =>$memeber["id"] ,'name'=>$details['first_name']." ".$details['last_name'],'team_name'=>$memeber['channel_view_name'],'team_id'=>$memeber['team_id_decoded']) |
136 | 136 | ); |
137 | 137 | // print_r($data); |
138 | - \Event::fire(\JoinNotificationEventHandler::EVENT, array(json_encode($data))); |
|
138 | + \Event::fire(\JoinNotificationEventHandler::EVENT, array(json_encode($data))); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | |
142 | 142 | } |
143 | 143 | |
144 | 144 | |
145 | - public function getUserDetails($user_id){ |
|
146 | - $details =\DB::table('users') |
|
147 | - ->select('users.first_name','users.last_name') |
|
148 | - ->where('id', '=', $user_id) |
|
149 | - ->first(); |
|
150 | - return $details; |
|
151 | - } |
|
145 | + public function getUserDetails($user_id){ |
|
146 | + $details =\DB::table('users') |
|
147 | + ->select('users.first_name','users.last_name') |
|
148 | + ->where('id', '=', $user_id) |
|
149 | + ->first(); |
|
150 | + return $details; |
|
151 | + } |
|
152 | 152 | |
153 | 153 | } |
154 | 154 | \ No newline at end of file |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | public function getTeams($id) {// |
12 | 12 | if (\Session::get("role") == 1) { |
13 | 13 | $teams = \DB::table('channels') |
14 | - ->select('team_channels.id', 'channels.channel_name', 'team_channels.channel_view_name', 'channels.author_id', "team_channels.created_at", 'team_channels.team_channel_id','team_heads.user_id') |
|
14 | + ->select('team_channels.id', 'channels.channel_name', 'team_channels.channel_view_name', 'channels.author_id', "team_channels.created_at", 'team_channels.team_channel_id', 'team_heads.user_id') |
|
15 | 15 | ->leftJoin('team_channels', 'channels.id', '=', 'team_channels.channel_name_id') |
16 | 16 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
17 | 17 | ->where('team_channels.id', '!=', '') |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | else { |
21 | 21 | $teams = \DB::table('team_channels') |
22 | - ->select('team_channels.channel_view_name', 'team_channels.team_channel_id', 'team_channels.id', 'team_channels.created_at','team_heads.user_id') |
|
22 | + ->select('team_channels.channel_view_name', 'team_channels.team_channel_id', 'team_channels.id', 'team_channels.created_at', 'team_heads.user_id') |
|
23 | 23 | ->leftJoin('team_channel_users', 'team_channel_users.team_channel_name_id', '=', 'team_channels.id') |
24 | 24 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
25 | 25 | ->where('team_channel_users.user_id', '=', \Auth::user()->id)->distinct()->get(); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ->leftJoin('team_channel_users', 'team_channel_users.user_id', '=', 'users.id') |
41 | 41 | ->where('team_channel_users.team_channel_name_id', '=', $teamId)->get(); |
42 | 42 | foreach ($teamMembers as $memeber) { |
43 | - $teamArr[] = $memeber["first_name"] . "_" . $memeber["last_name"] . "_" . $memeber["id"]; |
|
43 | + $teamArr[] = $memeber["first_name"]."_".$memeber["last_name"]."_".$memeber["id"]; |
|
44 | 44 | } |
45 | 45 | return $teamArr; |
46 | 46 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | public function getTeamName($id) { |
56 | 56 | $team = \DB::table('team_channels') |
57 | - ->select('team_channels.channel_view_name',\DB::raw('CONCAT(users.first_name, " ", users.last_name) AS full_name')) |
|
57 | + ->select('team_channels.channel_view_name', \DB::raw('CONCAT(users.first_name, " ", users.last_name) AS full_name')) |
|
58 | 58 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
59 | 59 | ->leftJoin('users', 'users.id', '=', 'team_heads.user_id') |
60 | 60 | ->where('team_channels.id', '=', $id)->first(); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | public function updateTeamName($id) { |
65 | 65 | $name = \Input::get('name'); |
66 | - if(empty($name)) |
|
66 | + if (empty($name)) |
|
67 | 67 | return "empty"; |
68 | 68 | try { |
69 | 69 | //validate for duplicates |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | return "true"; |
102 | 102 | } |
103 | 103 | |
104 | - public function updateNewMemberJoinNotification($team_id,$user_id){ |
|
104 | + public function updateNewMemberJoinNotification($team_id, $user_id) { |
|
105 | 105 | |
106 | 106 | /** |
107 | 107 | * |
@@ -112,10 +112,10 @@ discard block |
||
112 | 112 | */ |
113 | 113 | $teamArr = array(); |
114 | 114 | |
115 | - $details= $this->getUserDetails($user_id); |
|
115 | + $details = $this->getUserDetails($user_id); |
|
116 | 116 | |
117 | - $teamMembers =\DB::table('users') |
|
118 | - ->select('users.first_name','users.last_name', 'users.id','team_channels.channel_view_name','team_channels.team_channel_id','team_channels.id as team_id_decoded') |
|
117 | + $teamMembers = \DB::table('users') |
|
118 | + ->select('users.first_name', 'users.last_name', 'users.id', 'team_channels.channel_view_name', 'team_channels.team_channel_id', 'team_channels.id as team_id_decoded') |
|
119 | 119 | ->leftJoin('team_channel_users', 'team_channel_users.user_id', '=', 'users.id') |
120 | 120 | ->leftJoin('team_channels', 'team_channel_users.team_channel_name_id', '=', 'team_channels.id') |
121 | 121 | ->where('team_channel_users.team_channel_name_id', '=', $team_id)->get(); |
@@ -123,16 +123,16 @@ discard block |
||
123 | 123 | foreach ($teamMembers as $memeber) { |
124 | 124 | //insert notification |
125 | 125 | $lastId = \DB::table('invitation_notification')->insertGetId( |
126 | - ['team_id' => $team_id, "team_user" => $memeber["id"],'new_user'=>$user_id] |
|
126 | + ['team_id' => $team_id, "team_user" => $memeber["id"], 'new_user'=>$user_id] |
|
127 | 127 | ); |
128 | 128 | //Publish data to redis |
129 | - $channelId = $memeber["id"] . "_" . $memeber["team_channel_id"]; |
|
129 | + $channelId = $memeber["id"]."_".$memeber["team_channel_id"]; |
|
130 | 130 | |
131 | 131 | $teamChannelId = $memeber["team_channel_id"]; |
132 | 132 | |
133 | 133 | $data = array( |
134 | - 'room' =>$memeber["id"] . "_" . $memeber["team_channel_id"], |
|
135 | - 'message' => array('new_user_id'=>$user_id,'new_user_channel_id' => $user_id."_".$teamChannelId,'user_id' =>$memeber["id"] ,'name'=>$details['first_name']." ".$details['last_name'],'team_name'=>$memeber['channel_view_name'],'team_id'=>$memeber['team_id_decoded']) |
|
134 | + 'room' =>$memeber["id"]."_".$memeber["team_channel_id"], |
|
135 | + 'message' => array('new_user_id'=>$user_id, 'new_user_channel_id' => $user_id."_".$teamChannelId, 'user_id' =>$memeber["id"], 'name'=>$details['first_name']." ".$details['last_name'], 'team_name'=>$memeber['channel_view_name'], 'team_id'=>$memeber['team_id_decoded']) |
|
136 | 136 | ); |
137 | 137 | // print_r($data); |
138 | 138 | \Event::fire(\JoinNotificationEventHandler::EVENT, array(json_encode($data))); |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | |
145 | - public function getUserDetails($user_id){ |
|
146 | - $details =\DB::table('users') |
|
147 | - ->select('users.first_name','users.last_name') |
|
145 | + public function getUserDetails($user_id) { |
|
146 | + $details = \DB::table('users') |
|
147 | + ->select('users.first_name', 'users.last_name') |
|
148 | 148 | ->where('id', '=', $user_id) |
149 | 149 | ->first(); |
150 | 150 | return $details; |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | ->leftJoin('team_heads', 'team_heads.team_id', '=', 'team_channels.id') |
17 | 17 | ->where('team_channels.id', '!=', '') |
18 | 18 | ->where('channels.id', '=', $id)->distinct()->get(); |
19 | - } |
|
20 | - else { |
|
19 | + } else { |
|
21 | 20 | $teams = \DB::table('team_channels') |
22 | 21 | ->select('team_channels.channel_view_name', 'team_channels.team_channel_id', 'team_channels.id', 'team_channels.created_at','team_heads.user_id') |
23 | 22 | ->leftJoin('team_channel_users', 'team_channel_users.team_channel_name_id', '=', 'team_channels.id') |
@@ -63,8 +62,9 @@ discard block |
||
63 | 62 | |
64 | 63 | public function updateTeamName($id) { |
65 | 64 | $name = \Input::get('name'); |
66 | - if(empty($name)) |
|
67 | - return "empty"; |
|
65 | + if(empty($name)) { |
|
66 | + return "empty"; |
|
67 | + } |
|
68 | 68 | try { |
69 | 69 | //validate for duplicates |
70 | 70 | $data = \DB::table('team_channels') |
@@ -75,8 +75,9 @@ discard block |
||
75 | 75 | \DB::table('team_channels') |
76 | 76 | ->where('id', $id) |
77 | 77 | ->update(['channel_view_name' => $name]); |
78 | - } else |
|
79 | - return "exists"; |
|
78 | + } else { |
|
79 | + return "exists"; |
|
80 | + } |
|
80 | 81 | } catch (\Exception $e) { |
81 | 82 | //coudnt update |
82 | 83 | return "false"; |
@@ -86,8 +87,9 @@ discard block |
||
86 | 87 | |
87 | 88 | public function updateTeamHead($id) { |
88 | 89 | $userId = \Input::get('userId'); |
89 | - if (empty($userId)) |
|
90 | - return "empty"; |
|
90 | + if (empty($userId)) { |
|
91 | + return "empty"; |
|
92 | + } |
|
91 | 93 | try { |
92 | 94 | |
93 | 95 | //perform update |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class JoinNotificationEventHandler { |
6 | 6 | |
7 | - CONST EVENT = 'invite.status'; |
|
8 | - CONST CHANNEL = 'invite.status'; |
|
7 | + CONST EVENT = 'invite.status'; |
|
8 | + CONST CHANNEL = 'invite.status'; |
|
9 | 9 | |
10 | - public function handle($data) |
|
10 | + public function handle($data) |
|
11 | 11 | { |
12 | 12 | $redis = Redis::connection(); |
13 | 13 | $redis->publish(self::CHANNEL, $data); |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class ChatConversationsEventHandler { |
6 | 6 | |
7 | - CONST EVENT = 'chat.conversations'; |
|
8 | - CONST CHANNEL = 'chat.conversations'; |
|
7 | + CONST EVENT = 'chat.conversations'; |
|
8 | + CONST CHANNEL = 'chat.conversations'; |
|
9 | 9 | |
10 | - public function handle($data) |
|
10 | + public function handle($data) |
|
11 | 11 | { |
12 | 12 | $redis = Redis::connection(); |
13 | 13 | $redis->publish(self::CHANNEL, $data); |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class TaskNotificationEventHandler { |
6 | 6 | |
7 | - CONST EVENT = 'task.status'; |
|
8 | - CONST CHANNEL = 'task.status'; |
|
7 | + CONST EVENT = 'task.status'; |
|
8 | + CONST CHANNEL = 'task.status'; |
|
9 | 9 | |
10 | - public function handle($data) |
|
10 | + public function handle($data) |
|
11 | 11 | { |
12 | 12 | $redis = Redis::connection(); |
13 | 13 | $redis->publish(self::CHANNEL, $data); |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class ChatMessagesEventHandler { |
6 | 6 | |
7 | - CONST EVENT = 'chat.messages'; |
|
8 | - CONST CHANNEL = 'chat.messages'; |
|
7 | + CONST EVENT = 'chat.messages'; |
|
8 | + CONST CHANNEL = 'chat.messages'; |
|
9 | 9 | |
10 | - public function handle($data) |
|
10 | + public function handle($data) |
|
11 | 11 | { |
12 | 12 | $redis = Redis::connection(); |
13 | 13 | $redis->publish(self::CHANNEL, $data); |
@@ -4,10 +4,10 @@ |
||
4 | 4 | |
5 | 5 | class LoginStatusEventHandler { |
6 | 6 | |
7 | - CONST EVENT = 'chat.status'; |
|
8 | - CONST CHANNEL = 'chat.status'; |
|
7 | + CONST EVENT = 'chat.status'; |
|
8 | + CONST CHANNEL = 'chat.status'; |
|
9 | 9 | |
10 | - public function handle($data) |
|
10 | + public function handle($data) |
|
11 | 11 | { |
12 | 12 | $redis = Redis::connection(); |
13 | 13 | $redis->publish(self::CHANNEL, $data); |
@@ -17,51 +17,51 @@ discard block |
||
17 | 17 | |
18 | 18 | |
19 | 19 | Route::get('/', array( |
20 | - 'as' => 'main', |
|
21 | - 'uses' => 'MainController@welcome' |
|
20 | + 'as' => 'main', |
|
21 | + 'uses' => 'MainController@welcome' |
|
22 | 22 | )); |
23 | 23 | Route::get('/drive', array( |
24 | - 'as' => 'drive', |
|
25 | - 'uses' => 'DriveController@drive' |
|
24 | + 'as' => 'drive', |
|
25 | + 'uses' => 'DriveController@drive' |
|
26 | 26 | )); |
27 | 27 | |
28 | 28 | Route::get('/home', array( |
29 | 29 | 'before' => 'auth', |
30 | - 'as' => 'home', |
|
31 | - 'uses' => 'HomeController@showWelcome' |
|
30 | + 'as' => 'home', |
|
31 | + 'uses' => 'HomeController@showWelcome' |
|
32 | 32 | )); |
33 | 33 | Route::get('/reset', array( |
34 | 34 | |
35 | - 'as' => 'getRemind', |
|
36 | - 'uses' => 'RemindersController@getRemind' |
|
35 | + 'as' => 'getRemind', |
|
36 | + 'uses' => 'RemindersController@getRemind' |
|
37 | 37 | )); |
38 | 38 | Route::post('/post_remind', array( |
39 | 39 | |
40 | - 'as' => 'postRemind', |
|
41 | - 'uses' => 'RemindersController@postRemind' |
|
40 | + 'as' => 'postRemind', |
|
41 | + 'uses' => 'RemindersController@postRemind' |
|
42 | 42 | )); |
43 | 43 | Route::post('/post_reset', array( |
44 | 44 | |
45 | - 'as' => 'postReset', |
|
46 | - 'uses' => 'RemindersController@postReset' |
|
45 | + 'as' => 'postReset', |
|
46 | + 'uses' => 'RemindersController@postReset' |
|
47 | 47 | )); |
48 | 48 | Route::get('/password/reset/{token}', array( |
49 | 49 | |
50 | - 'as' => 'getReset', |
|
51 | - 'uses' => 'RemindersController@getReset' |
|
50 | + 'as' => 'getReset', |
|
51 | + 'uses' => 'RemindersController@getReset' |
|
52 | 52 | )); |
53 | 53 | Route::post('/login', array( |
54 | - 'as' => 'auth.postLogin', |
|
55 | - 'uses' => 'AuthController@postLogin' |
|
54 | + 'as' => 'auth.postLogin', |
|
55 | + 'uses' => 'AuthController@postLogin' |
|
56 | 56 | )); |
57 | 57 | Route::post('/update_login_status', array( |
58 | 58 | 'before' => 'auth', |
59 | - 'as' => 'login_status', |
|
60 | - 'uses' => 'AuthController@updateStatus' |
|
59 | + 'as' => 'login_status', |
|
60 | + 'uses' => 'AuthController@updateStatus' |
|
61 | 61 | )); |
62 | 62 | Route::get('/logout', array( |
63 | - 'as' => 'logout', |
|
64 | - 'uses' => 'AuthController@logout' |
|
63 | + 'as' => 'logout', |
|
64 | + 'uses' => 'AuthController@logout' |
|
65 | 65 | )); |
66 | 66 | //Route::get('/login', array( |
67 | 67 | // 'as' => 'auth.getLogin', |
@@ -69,138 +69,138 @@ discard block |
||
69 | 69 | //)); |
70 | 70 | |
71 | 71 | Route::get('/register', array( |
72 | - 'as' => 'register_user', |
|
73 | - 'uses' => 'RegisterController@registerUser' |
|
72 | + 'as' => 'register_user', |
|
73 | + 'uses' => 'RegisterController@registerUser' |
|
74 | 74 | )); |
75 | 75 | |
76 | 76 | |
77 | 77 | |
78 | 78 | Route::get('/chat/', array( |
79 | - 'before' => 'auth', |
|
80 | - 'as' => 'chat.index', |
|
81 | - 'uses' => 'ChatController@index' |
|
79 | + 'before' => 'auth', |
|
80 | + 'as' => 'chat.index', |
|
81 | + 'uses' => 'ChatController@index' |
|
82 | 82 | )); |
83 | 83 | |
84 | 84 | Route::post('/getmessages/', array( |
85 | - 'before' => 'auth', |
|
86 | - 'as' => 'messages.index', |
|
87 | - 'uses' => 'MessageController@index' |
|
85 | + 'before' => 'auth', |
|
86 | + 'as' => 'messages.index', |
|
87 | + 'uses' => 'MessageController@index' |
|
88 | 88 | )); |
89 | 89 | |
90 | 90 | Route::post('/messages/', array( |
91 | - 'before' => 'auth', |
|
92 | - 'as' => 'messages.send_message', |
|
93 | - 'uses' => 'MessageController@send_message' |
|
91 | + 'before' => 'auth', |
|
92 | + 'as' => 'messages.send_message', |
|
93 | + 'uses' => 'MessageController@send_message' |
|
94 | 94 | )); |
95 | 95 | Route::post('/typing/', array( |
96 | - 'before' => 'auth', |
|
97 | - //'as' => 'messages.store', |
|
98 | - 'uses' => 'MessageType@index' |
|
96 | + 'before' => 'auth', |
|
97 | + //'as' => 'messages.store', |
|
98 | + 'uses' => 'MessageType@index' |
|
99 | 99 | )); |
100 | 100 | |
101 | 101 | Route::post('users/{user_id}/conversations', array( |
102 | - 'before' => 'auth', |
|
103 | - 'as' => 'conversations_users.index', |
|
104 | - 'uses' => 'ConversationUserController@index' |
|
102 | + 'before' => 'auth', |
|
103 | + 'as' => 'conversations_users.index', |
|
104 | + 'uses' => 'ConversationUserController@index' |
|
105 | 105 | )); |
106 | 106 | |
107 | 107 | Route::post('/conversations/', array( |
108 | - 'before' => 'auth', |
|
109 | - 'as' => 'conversations.store', |
|
110 | - 'uses' => 'ConversationController@store' |
|
108 | + 'before' => 'auth', |
|
109 | + 'as' => 'conversations.store', |
|
110 | + 'uses' => 'ConversationController@store' |
|
111 | 111 | )); |
112 | 112 | Route::get('/personal_conversations/', array( |
113 | - 'before' => 'auth', |
|
114 | - 'as' => 'conversations.personal_conversations', |
|
115 | - 'uses' => 'ConversationController@personal_conversations' |
|
113 | + 'before' => 'auth', |
|
114 | + 'as' => 'conversations.personal_conversations', |
|
115 | + 'uses' => 'ConversationController@personal_conversations' |
|
116 | 116 | )); |
117 | 117 | Route::get('/conversations/', array( |
118 | - 'before' => 'auth', |
|
119 | - 'as' => 'conversations', |
|
120 | - 'uses' => 'ConversationController@conversations' |
|
118 | + 'before' => 'auth', |
|
119 | + 'as' => 'conversations', |
|
120 | + 'uses' => 'ConversationController@conversations' |
|
121 | 121 | )); |
122 | 122 | |
123 | 123 | Route::post('/create_team', array( |
124 | - 'before' => 'auth', |
|
125 | - 'as' => 'createTeam', |
|
126 | - 'uses' => 'TeamController@create_team_channels' |
|
124 | + 'before' => 'auth', |
|
125 | + 'as' => 'createTeam', |
|
126 | + 'uses' => 'TeamController@create_team_channels' |
|
127 | 127 | )); |
128 | 128 | |
129 | 129 | Route::post('/create_team_member', array( |
130 | - 'before' => 'auth', |
|
131 | - 'as' => 'createTeamMember', |
|
132 | - 'uses' => 'TeamController@create_team_members' |
|
130 | + 'before' => 'auth', |
|
131 | + 'as' => 'createTeamMember', |
|
132 | + 'uses' => 'TeamController@create_team_members' |
|
133 | 133 | )); |
134 | 134 | |
135 | 135 | |
136 | 136 | Route::post('/get_teams', array( |
137 | - 'before' => 'auth', |
|
138 | - 'as' => 'getTeam', |
|
139 | - 'uses' => 'TeamController@get_teams' |
|
137 | + 'before' => 'auth', |
|
138 | + 'as' => 'getTeam', |
|
139 | + 'uses' => 'TeamController@get_teams' |
|
140 | 140 | )); |
141 | 141 | |
142 | 142 | Route::get('/list_teams', array( |
143 | - 'before' => 'auth', |
|
144 | - 'as' => 'list_teams_and_team_memebers', |
|
145 | - 'uses' => 'TeamController@list_teams_and_team_memebers' |
|
143 | + 'before' => 'auth', |
|
144 | + 'as' => 'list_teams_and_team_memebers', |
|
145 | + 'uses' => 'TeamController@list_teams_and_team_memebers' |
|
146 | 146 | )); |
147 | 147 | |
148 | 148 | Route::post('/unread_notifications', array( |
149 | - 'before' => 'auth', |
|
150 | - 'as' => 'get_unread_notifications', |
|
151 | - 'uses' => 'NotificationController@unread_notifications' |
|
149 | + 'before' => 'auth', |
|
150 | + 'as' => 'get_unread_notifications', |
|
151 | + 'uses' => 'NotificationController@unread_notifications' |
|
152 | 152 | )); |
153 | 153 | |
154 | 154 | Route::post('/update_read_status', array( |
155 | - 'before' => 'auth', |
|
156 | - 'as' => 'update_read_status', |
|
157 | - 'uses' => 'NotificationController@update_status' |
|
155 | + 'before' => 'auth', |
|
156 | + 'as' => 'update_read_status', |
|
157 | + 'uses' => 'NotificationController@update_status' |
|
158 | 158 | )); |
159 | 159 | |
160 | 160 | Route::post('/get_team_members', array( |
161 | - 'before' => 'auth', |
|
162 | - 'as' => 'team_members', |
|
163 | - 'uses' => 'TeamController@getTeamMembers' |
|
161 | + 'before' => 'auth', |
|
162 | + 'as' => 'team_members', |
|
163 | + 'uses' => 'TeamController@getTeamMembers' |
|
164 | 164 | )); |
165 | 165 | |
166 | 166 | |
167 | 167 | Route::get('/invitation/{token}', array( |
168 | 168 | |
169 | - 'as' => 'invitation', |
|
170 | - 'uses' => 'TeamController@activate_invited_member' |
|
169 | + 'as' => 'invitation', |
|
170 | + 'uses' => 'TeamController@activate_invited_member' |
|
171 | 171 | )); |
172 | 172 | |
173 | 173 | Route::get('/login/{email}/{password}/{token}', array( |
174 | 174 | |
175 | - 'as' => 'invitation_account_creation', |
|
176 | - 'uses' => 'AuthController@getSignup' |
|
175 | + 'as' => 'invitation_account_creation', |
|
176 | + 'uses' => 'AuthController@getSignup' |
|
177 | 177 | )); |
178 | 178 | |
179 | 179 | |
180 | 180 | Route::get('/user_profile', array( |
181 | - 'as' => 'user_profile', |
|
182 | - 'uses' => 'UserProfileController@userProfile' |
|
181 | + 'as' => 'user_profile', |
|
182 | + 'uses' => 'UserProfileController@userProfile' |
|
183 | 183 | )); |
184 | 184 | |
185 | 185 | Route::post('/updateprofile', array( |
186 | - 'as' => 'upadte_profile', |
|
187 | - 'uses' => 'UserProfileController@updateProfile' |
|
186 | + 'as' => 'upadte_profile', |
|
187 | + 'uses' => 'UserProfileController@updateProfile' |
|
188 | 188 | )); |
189 | 189 | |
190 | 190 | Route::post('/updateprofilepicture', array( |
191 | - 'as' => 'update_profile_picture', |
|
192 | - 'uses' => 'UserProfileController@updateProfilePicture' |
|
191 | + 'as' => 'update_profile_picture', |
|
192 | + 'uses' => 'UserProfileController@updateProfilePicture' |
|
193 | 193 | )); |
194 | 194 | |
195 | 195 | Route::get('/view_profile/{userId}', array( |
196 | - 'as' => 'view_profile', |
|
197 | - 'uses' => 'UserProfileController@viewProfile' |
|
196 | + 'as' => 'view_profile', |
|
197 | + 'uses' => 'UserProfileController@viewProfile' |
|
198 | 198 | )); |
199 | 199 | |
200 | 200 | Route::post('/update_timezone/', array( |
201 | 201 | 'before' => 'auth', |
202 | - 'as' => 'update_tz', |
|
203 | - 'uses' => 'AuthController@updateTimeZone' |
|
202 | + 'as' => 'update_tz', |
|
203 | + 'uses' => 'AuthController@updateTimeZone' |
|
204 | 204 | )); |
205 | 205 | |
206 | 206 | /* |
@@ -210,76 +210,76 @@ discard block |
||
210 | 210 | Route::group(array('prefix' => 'task','before' => 'auth'), function() |
211 | 211 | { |
212 | 212 | Route::post('/get_project_teams', 'TaskController@get_project_teams'); |
213 | - Route::post('/get_members', 'TaskController@get_members'); |
|
213 | + Route::post('/get_members', 'TaskController@get_members'); |
|
214 | 214 | Route::post('/create_project', array('before' => 'security_check:create_project,write', 'as'=>'createProject','uses' => 'TaskController@create_project')); |
215 | - Route::post('/create_task', array('before' => 'security_check:create_task,write', 'as'=>'createTask','uses' => 'TaskController@create_task')); |
|
215 | + Route::post('/create_task', array('before' => 'security_check:create_task,write', 'as'=>'createTask','uses' => 'TaskController@create_task')); |
|
216 | 216 | Route::post('/dashboard', 'TaskController@dashboard'); |
217 | - Route::post('/validate_create_task', array('before' => 'security_check:create_task,write')); |
|
218 | - Route::post('/rollback_saved_task', array('as'=>'rollbackTask','uses' => 'TaskController@rollback_task')); |
|
217 | + Route::post('/validate_create_task', array('before' => 'security_check:create_task,write')); |
|
218 | + Route::post('/rollback_saved_task', array('as'=>'rollbackTask','uses' => 'TaskController@rollback_task')); |
|
219 | 219 | Route::post('/filter_grid', array( 'as'=>'filterGrid','uses' => 'TaskController@filter_grid')); |
220 | - Route::post('/filter_all_dashboard_data', array( 'as'=>'filterAllDashboard','uses' => 'TaskController@filter_dashboard')); |
|
220 | + Route::post('/filter_all_dashboard_data', array( 'as'=>'filterAllDashboard','uses' => 'TaskController@filter_dashboard')); |
|
221 | 221 | Route::post('/view_assignment', array( 'as'=>'viewAssignment','uses' => 'TaskController@view_assignment')); |
222 | 222 | Route::get('/updates/{task_id}', array( 'as'=>'recentUpdates','uses' => 'TaskController@recent_updates')); |
223 | 223 | }); |
224 | 224 | |
225 | 225 | Route::post('/delete_team', array( |
226 | - 'before' => 'auth', |
|
227 | - 'as' => 'delete_team', |
|
228 | - 'uses' => 'TeamController@deleteTeam' |
|
226 | + 'before' => 'auth', |
|
227 | + 'as' => 'delete_team', |
|
228 | + 'uses' => 'TeamController@deleteTeam' |
|
229 | 229 | )); |
230 | 230 | |
231 | 231 | Route::post('/update_team_name', array( |
232 | - 'before' => 'auth', |
|
233 | - 'as' => 'update_team_name', |
|
234 | - 'uses' => 'TeamController@update_team_name' |
|
232 | + 'before' => 'auth', |
|
233 | + 'as' => 'update_team_name', |
|
234 | + 'uses' => 'TeamController@update_team_name' |
|
235 | 235 | )); |
236 | 236 | |
237 | 237 | Route::post('/update_team_head', array( |
238 | - 'before' => 'auth', |
|
239 | - 'as' => 'update_team_head', |
|
240 | - 'uses' => 'TeamController@update_team_head' |
|
238 | + 'before' => 'auth', |
|
239 | + 'as' => 'update_team_head', |
|
240 | + 'uses' => 'TeamController@update_team_head' |
|
241 | 241 | )); |
242 | 242 | Route::post('/get_team_name', array( |
243 | - 'before' => 'auth', |
|
244 | - 'as' => 'get_team_name', |
|
245 | - 'uses' => 'TeamController@get_team_name' |
|
243 | + 'before' => 'auth', |
|
244 | + 'as' => 'get_team_name', |
|
245 | + 'uses' => 'TeamController@get_team_name' |
|
246 | 246 | )); |
247 | 247 | Route::get('/list_teams_memebers', array( |
248 | - 'before' => 'auth', |
|
249 | - 'as' => 'list_teams_memebers', |
|
250 | - 'uses' => 'TeamController@list_teams_memebers' |
|
248 | + 'before' => 'auth', |
|
249 | + 'as' => 'list_teams_memebers', |
|
250 | + 'uses' => 'TeamController@list_teams_memebers' |
|
251 | 251 | )); |
252 | 252 | |
253 | 253 | Route::post('/upload_user_files/{name?}', array( |
254 | - 'as' => 'upload_user_files', |
|
255 | - 'uses' => 'FileUploadController@uploadFiles' |
|
254 | + 'as' => 'upload_user_files', |
|
255 | + 'uses' => 'FileUploadController@uploadFiles' |
|
256 | 256 | )); |
257 | 257 | Route::post('/fileUploadStatus', array( |
258 | - 'as' => 'fileUploadStatus', |
|
259 | - 'uses' => 'FileUploadController@fileUploadStatus' |
|
258 | + 'as' => 'fileUploadStatus', |
|
259 | + 'uses' => 'FileUploadController@fileUploadStatus' |
|
260 | 260 | )); |
261 | 261 | Route::post('/get_snippet_code', array( |
262 | - 'before' => 'auth', |
|
263 | - 'as' => 'get_snippet_code', |
|
264 | - 'uses' => 'ConversationController@get_snippet_code' |
|
262 | + 'before' => 'auth', |
|
263 | + 'as' => 'get_snippet_code', |
|
264 | + 'uses' => 'ConversationController@get_snippet_code' |
|
265 | 265 | )); |
266 | 266 | |
267 | 267 | Route::get('/video', array( |
268 | - 'as' => 'video', |
|
269 | - 'uses' => 'VideoChatController@video' |
|
268 | + 'as' => 'video', |
|
269 | + 'uses' => 'VideoChatController@video' |
|
270 | 270 | )); |
271 | 271 | |
272 | 272 | Route::get('/settings', array( |
273 | - 'as' => 'settings', |
|
274 | - 'uses' => 'UserProfileController@settings' |
|
273 | + 'as' => 'settings', |
|
274 | + 'uses' => 'UserProfileController@settings' |
|
275 | 275 | )); |
276 | 276 | |
277 | 277 | Route::post('/updatePassword', array( |
278 | - 'as' => 'update_password', |
|
279 | - 'uses' => 'UserProfileController@updatePassword' |
|
278 | + 'as' => 'update_password', |
|
279 | + 'uses' => 'UserProfileController@updatePassword' |
|
280 | 280 | )); |
281 | 281 | |
282 | 282 | Route::post('/deactivateAccount', array( |
283 | - 'as' => 'deactivate', |
|
284 | - 'uses' => 'UserProfileController@deactivateAccount' |
|
283 | + 'as' => 'deactivate', |
|
284 | + 'uses' => 'UserProfileController@deactivateAccount' |
|
285 | 285 | )); |
@@ -207,19 +207,19 @@ |
||
207 | 207 | * Task routes |
208 | 208 | * |
209 | 209 | */ |
210 | -Route::group(array('prefix' => 'task','before' => 'auth'), function() |
|
210 | +Route::group(array('prefix' => 'task', 'before' => 'auth'), function() |
|
211 | 211 | { |
212 | 212 | Route::post('/get_project_teams', 'TaskController@get_project_teams'); |
213 | 213 | Route::post('/get_members', 'TaskController@get_members'); |
214 | - Route::post('/create_project', array('before' => 'security_check:create_project,write', 'as'=>'createProject','uses' => 'TaskController@create_project')); |
|
215 | - Route::post('/create_task', array('before' => 'security_check:create_task,write', 'as'=>'createTask','uses' => 'TaskController@create_task')); |
|
214 | + Route::post('/create_project', array('before' => 'security_check:create_project,write', 'as'=>'createProject', 'uses' => 'TaskController@create_project')); |
|
215 | + Route::post('/create_task', array('before' => 'security_check:create_task,write', 'as'=>'createTask', 'uses' => 'TaskController@create_task')); |
|
216 | 216 | Route::post('/dashboard', 'TaskController@dashboard'); |
217 | 217 | Route::post('/validate_create_task', array('before' => 'security_check:create_task,write')); |
218 | - Route::post('/rollback_saved_task', array('as'=>'rollbackTask','uses' => 'TaskController@rollback_task')); |
|
219 | -Route::post('/filter_grid', array( 'as'=>'filterGrid','uses' => 'TaskController@filter_grid')); |
|
220 | - Route::post('/filter_all_dashboard_data', array( 'as'=>'filterAllDashboard','uses' => 'TaskController@filter_dashboard')); |
|
221 | -Route::post('/view_assignment', array( 'as'=>'viewAssignment','uses' => 'TaskController@view_assignment')); |
|
222 | -Route::get('/updates/{task_id}', array( 'as'=>'recentUpdates','uses' => 'TaskController@recent_updates')); |
|
218 | + Route::post('/rollback_saved_task', array('as'=>'rollbackTask', 'uses' => 'TaskController@rollback_task')); |
|
219 | +Route::post('/filter_grid', array('as'=>'filterGrid', 'uses' => 'TaskController@filter_grid')); |
|
220 | + Route::post('/filter_all_dashboard_data', array('as'=>'filterAllDashboard', 'uses' => 'TaskController@filter_dashboard')); |
|
221 | +Route::post('/view_assignment', array('as'=>'viewAssignment', 'uses' => 'TaskController@view_assignment')); |
|
222 | +Route::get('/updates/{task_id}', array('as'=>'recentUpdates', 'uses' => 'TaskController@recent_updates')); |
|
223 | 223 | }); |
224 | 224 | |
225 | 225 | Route::post('/delete_team', array( |
@@ -2,18 +2,18 @@ |
||
2 | 2 | |
3 | 3 | class TestCase extends Illuminate\Foundation\Testing\TestCase { |
4 | 4 | |
5 | - /** |
|
6 | - * Creates the application. |
|
7 | - * |
|
8 | - * @return \Symfony\Component\HttpKernel\HttpKernelInterface |
|
9 | - */ |
|
10 | - public function createApplication() |
|
11 | - { |
|
12 | - $unitTesting = true; |
|
5 | + /** |
|
6 | + * Creates the application. |
|
7 | + * |
|
8 | + * @return \Symfony\Component\HttpKernel\HttpKernelInterface |
|
9 | + */ |
|
10 | + public function createApplication() |
|
11 | + { |
|
12 | + $unitTesting = true; |
|
13 | 13 | |
14 | - $testEnvironment = 'testing'; |
|
14 | + $testEnvironment = 'testing'; |
|
15 | 15 | |
16 | - return require __DIR__.'/../../bootstrap/start.php'; |
|
17 | - } |
|
16 | + return require __DIR__.'/../../bootstrap/start.php'; |
|
17 | + } |
|
18 | 18 | |
19 | 19 | } |