/**
  * Access Switches Index
  */
 public function index()
 {
     $dhcpConfiFile = 'dhcp/dhcpd.conf';
     if (Storage::exists($dhcpConfiFile)) {
         $dhcp_config_file = Storage::get($dhcpConfiFile);
     } else {
         $dhcp_config_file = '';
     }
     $shared_networks = DhcpSharedNetwork::all();
     return view('dhcp.index')->with('sharedNetworks', $shared_networks)->with('dhcp_config_file', $dhcp_config_file);
 }
 /**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $provisioning = Provisioning::all();
     $customers = Customer::all();
     $onts = Ont::all();
     $accessSwitches = AccessSwitch::all();
     $dhcpSharedNetworks = DhcpSharedNetwork::all();
     $ipaddresses = Ipaddress::all();
     $ports = AccessSwitchPort::all();
     return view('home')->with('provisioning', $provisioning)->with('customers', $customers)->with('onts', $onts)->with('accessSwitches', $accessSwitches)->with('ports', $ports)->with('ipaddresses', $ipaddresses)->with('DhcpSharedNetworks', $dhcpSharedNetworks);
 }
Exemple #3
0
 public function getDhcpFile()
 {
     if (Cache::has('dhcpfile')) {
         return (new Response(Cache::get('dhcpfile'), 200))->header('Content-Type', 'text/plain');
     }
     $globals = DhcpOption::globals()->get();
     $networks = DhcpSharedNetwork::all();
     $subnets = DhcpSubnet::notInSharedNetwork()->get();
     $entries = DhcpEntry::all();
     $dhcpFile = new DhcpFile($globals, $networks, $subnets, $entries);
     $contents = Cache::rememberForever('dhcpfile', function () use($dhcpFile) {
         return $dhcpFile->asText();
     });
     return (new Response($contents, 200))->header('Content-Type', 'text/plain');
 }
 public function index()
 {
     $networks = DhcpSharedNetwork::all();
     return view('dhcp.network.index', compact('networks'));
 }
 public function edit($id)
 {
     $subnet = DhcpSubnet::findOrFail($id);
     $networks = DhcpSharedNetwork::all();
     return view('dhcp.subnet.edit', compact('subnet', 'networks'));
 }