/** * display bssid_clients in node * */ public function bssid_clients($id) { $node = \App\Node::findOrFail($id); $clients = \App\Bd::where('node_id', $id)->orderBy('clientMacAddress')->paginate(10); return view('nodes.bssid_clients', compact('node', 'clients')); }
/** * * @return view */ public function bssid_clients() { if (\Request::has('q')) { $q = trim(\Request::get('q')); $clients = \App\Bd::where('clientIpAddress', 'RLIKE', $q)->orWhere('clientMacAddress', 'RLIKE', $q)->orderBy('timestamp', 'desc')->paginate(10); } else { $clients = []; $q = ''; } return view('pages.bssid_clients', compact('clients', 'q')); }