Show packet contents for nodes
This commit is contained in:
@@ -31,6 +31,34 @@ class HomeController extends Controller
|
||||
->with('o',$o);
|
||||
}
|
||||
|
||||
public function packet_contents(string $packet)
|
||||
{
|
||||
$nm = Netmail::select('netmails.*')
|
||||
->distinct()
|
||||
->leftJoin('netmail_path',['netmail_path.netmail_id'=>'netmails.id'])
|
||||
->where(function($query) use ($packet) {
|
||||
return $query
|
||||
->where('sent_pkt',$packet)
|
||||
->orWhere('netmail_path.recv_pkt',$packet);
|
||||
})
|
||||
->get();
|
||||
|
||||
$em = Echomail::select('echomails.*')
|
||||
->distinct()
|
||||
->leftJoin('echomail_seenby',['echomail_seenby.echomail_id'=>'echomails.id'])
|
||||
->leftJoin('echomail_path',['echomail_path.echomail_id'=>'echomails.id'])
|
||||
->where(function($query) use ($packet) {
|
||||
return $query
|
||||
->where('sent_pkt',$packet)
|
||||
->orWhere('recv_pkt',$packet);
|
||||
})
|
||||
->get();
|
||||
|
||||
return view('packet')
|
||||
->with('nm',$nm)
|
||||
->with('em',$em);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a view that summarises the users permissions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user