mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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());
|
||
|
|
}
|
||
|
|
}
|