Method validate does not exit. I tried to validate my form values as shown in the figure. But it give me this error. Please tell me . I am new to laravel. [
1 Answer
You aren't extending the correct Controller.
class UserController extends Controller { ... } Controller then extends BaseController.
If you open up Controller which resides in the same namespace as your other controllers, you will see it uses the trait ValidatesRequests which is what provides the validate method.
You can also remove the line use Illuminate\Routing\Controller as BaseController;. There should be no reason to import that.
1 Comment
Anand Moghe
Actually it is not working on my Laravel 5.4.36. I am extending the Controller for my RegisterController.

use Validator;to the top of your controller?