Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function index($user_id) { |
||
11 | $conversations_users = ConversationUser::where('user_id', $user_id)->lists('conversation_id'); |
||
12 | |||
13 | $conversations = array(); |
||
14 | |||
15 | if($conversations_users) { |
||
16 | $conversations = Conversation::whereIn('id', $conversations_users)->get(); |
||
17 | } |
||
18 | |||
19 | return Response::json([ |
||
|
|||
20 | 'success' => true, |
||
21 | 'result' => $conversations |
||
22 | ]); |
||
25 |