Lumen development problem: Call to undefined method Illuminate\Validation\Validator::make()

This error message is reported when doing form validation, because the Validator class is referenced incorrectly.

Incorrect:
use Illuminate\Validation\Validator;

correct:
use Illuminate\Support\Facades\Validator;

After switching the reference class, this error may still be reported
 A facade root has not been set.
To use the facade, it must be enabled manually, in bootstrap/app.php
Uncomment the line $app->withFacades();

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324694716&siteId=291194637