public function register(Request $request) { // Check if honeypot field is filled if (!empty($request->input('hidden_field_name'))) { return redirect()->back()->withErrors(['spam' => 'Spam detected.']); } // Continue with registration process $request->validate([ 'firstname' => 'required|string|max:255', 'lastname' => 'required|string|max:255', 'email' => 'required|email|unique:users', 'password' => 'required|confirmed|min:6', ]); // Create the user... }