mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Revamp validate web page to load page then validate, instead of validate then load page * style fixes * lint cleanups * fixes * translations and a couple fixes * style fixes * move result serialization into the class.
24 lines
458 B
PHP
24 lines
458 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\Http\JsonResponse;
|
|
use LibreNMS\Validator;
|
|
|
|
class ValidateController extends Controller
|
|
{
|
|
public function index(): View
|
|
{
|
|
return view('validate.index');
|
|
}
|
|
|
|
public function runValidation(): JsonResponse
|
|
{
|
|
$validator = new Validator();
|
|
$validator->validate();
|
|
|
|
return response()->json($validator->toArray());
|
|
}
|
|
}
|