check first that in witch part error generate validation pass or at fail time by only
echo "something";exit;
and then focus on that part...
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to create a form that when I person hits submit then an email is sent to the email that the person provided. When I hit submit I get this error
FatalErrorException in ClassLoader.php line 347:
Maximum function nesting level of '100' reached, aborting!
This is my usersController
<?php namespace Modules\Users\Http\Controllers;
use Pingpong\Modules\Routing\Controller;
Use Mail;
use Modules\Users\Models\User;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
class UsersController extends Controller {
public function store()
{
$users = new User();
//Gets all the input in the fields in the form
$input = Input::all();
//Checks the input fields against the validation rules in the User model
$validation = Validator::make($input, User::$rules);
//If the validation fails the a message will pop up saying that there was validation errors
if($validation->fails()){
return redirect()->route('admin.users.create')
->withInput()
->withErrors($validation)
->with('message', 'There were validation errors');
}
//If the validation passes then an email is sent to the user
if($validation->passes()){
$users->name = Input::get('name');
$users->email = Input::get('email');
$users->image = Input::get('image');
//Gets the password that was generated from the User model
$password = $users->generatePassword();
//Takes the generated password and hashes it to make it secure
$users->password = bcrypt($password);
$data = array(
'name' => Input::get('name'),
'email' => Input::get('email'),
'password' => $password,
);
//Sends the data into an email to be sent off
Mail::send('emails.login', $data, function($message){
$message->to(Input::get('email'), Input::get('name'))->subject('Your login details');
});
//Saves the user
$users->save();
$users = User::all();
return view('users::admin.index', compact('users'));
}
}
}
@Ifrit - in the php.ini file. Lets assume nothing :)
Add this to the top of your routes.php file:
dd(php_ini_loaded_file());
This will display the currently loaded php.ini file. Edit this file and search for zend_extension where it loads the php_xdebug module.
Then put a semi-colon in front of that line.
Restart Apache / php-cgi depending on your setup.
Please or to participate in this conversation.