Reputation: 477
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.
[
Upvotes: 0
Views: 1330
Reputation: 33058
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.
Upvotes: 4