Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @param PortForward $forward
  *
  * @return Response
  */
 public function index(PortForward $forward, Clones $clone)
 {
     $settings = $this->setting->all();
     $forwards = $forward->orderBy('starting_port', 'asc')->get();
     $clones = $clone->all();
     $this->setViewData(compact('settings', 'forwards', 'clones'));
 }
Example #2
0
 public function getDisplayPortAttribute()
 {
     $port = $this->port;
     $forward = PortForward::where('destination_port', $port)->first();
     if ($forward != null) {
         return $forward->starting_port;
     }
     return $port;
 }