/** * Unsuspends a customer's ONT */ public function destroy(Provisioning $provisioning) { $provisioning->suspended = 0; $provisioning->save(); $unsuspend = $provisioning->enableUserPorts(); if ($unsuspend == '0') { flash()->overlay('Success', 'Service for this ONT has been reactivated', 'success'); } if ($unsuspend == '1') { logThis('Queued ONT re-activation for ' . $provisioning->customer->name); flash()->overlay('Queued', 'Re-activation of this ONT has been queued.', 'info'); } if ($unsuspend == '2') { flash()->overlay('Failed', 'There was an error while re-activating this ONT. Please look in Application Logs for more info', 'error'); } return back(); }
/** * 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); }
/** * Execute the console command. * * @return mixed */ public function handle() { $requestTime = $_SERVER['REQUEST_TIME']; $queuedForSuspend = SuspendQueue::whereAction(1)->get(); foreach ($queuedForSuspend as $job) { $provisioningRecord = Provisioning::findOrFail($job->provisioning_id); $disable = $provisioningRecord->disableUserPorts(); if ($disable == '0') { logThis('GASuspendQueueRun: ONT for ' . $provisioningRecord->customer->name . ' back online. Service suspended.'); } elseif ($disable == '1') { logThis('GASuspendQueueRun: ONT for ' . $provisioningRecord->customer->name . ' still offline. Re-queueing suspension.'); } elseif ($disable == '2') { logThis('GASuspendQueueRun: ONT for ' . $provisioningRecord->customer->name . ' back online, but there was an error suspending service.'); } } }
/** * Reset an ONT to factory defaults */ public function reset(Request $request) { $provisioningRecord = Provisioning::findOrFail($request->id); return $provisioningRecord->resetToFactory(); }
/** * Get interfaces info */ public function interfaces(Provisioning $provisioning) { return $provisioning->interfaces(); }
/** * Execute the job. * * @return void */ public function handle(Provisioning $provisioning) { $provisioning->rewriteDhcpConfig(); $provisioning->deployDhcpConfig(); }
public function test(Provisioning $provisioning) { dd($provisioning->routeInfo()); }