Merge branch 'develop' into trunk
This commit is contained in:
commit
f1c5c5ba41
2 changed files with 15 additions and 2 deletions
|
|
@ -15,7 +15,20 @@ class LDCNetworksController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
// $networks = LDCNetwork::all();
|
||||
// return \response()->json((new LDCNetworkResource($networks)));
|
||||
|
||||
$ips = [];
|
||||
|
||||
$networks = LDCNetwork::all();
|
||||
return \response()->json((new LDCNetworkResource($networks)));
|
||||
foreach ($networks as $network) {
|
||||
$infos = explode('.', $network->first_ip);
|
||||
$min = $infos[3];
|
||||
$max = explode('.', $network->last_ip)[3];
|
||||
for ($i = $min; $i <= $max; $i++) {
|
||||
$ips[] = "$infos[0].$infos[1].$infos[2].$i";
|
||||
}
|
||||
}
|
||||
return response($ips);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class ServiceAccountsController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$service_accounts = ServiceAccount::all();
|
||||
$service_accounts = ServiceAccount::all()->sortBy('name');
|
||||
return view('service-accounts.index', compact('service_accounts'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue