Files
librenms-librenms/app/Http/Controllers/ValidateController.php
Tony Murray 0a84098211 Port Validation Page to Laravel (#13921)
* 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.
2022-04-14 11:22:40 -05:00

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());
}
}