public function getInbox() { $db = Inbox::grouping(); $response["error"] = FALSE; $response["data"] = $db; return \Response::json($response); }
public function index() { if (\Request::ajax()) { $db = Inbox::grouping(); return \Response::json($db); } else { if (\Session::get('group') == 'On') { $view = 'inbox.index'; } else { $db = Inbox::listing(20); $view = 'inbox.inbox'; } $data['list_keyword'] = Keyword::select('keyword')->get(); return view($view)->with('data', $data); } }