Uninitialized string offset: 0

Submitted by sanjar04.06.1991 - 9 years ago

Auth::attempt($auth) giving problem. ErrorException in ClassLoader.php line 317: Uninitialized string offset: 0

public function postSignIn(){

    	// validate the info, create rules for the inputs
		$rules = 
			[
				'email'    => 'required|email', // make sure the email is an actual email
				'password' => 'required|alphaNum|min:6' // password can only be alphanumeric and has to be greater than 3 characters
			];

		$validator = Validator::make(Input::all(), $rules);

		if ($validator->fails()) {
			return Redirect::route('account-sign-in')
				->withErrors($validator)
				->withInput();
		}
		 else{
			$auth = 
				[
					'email' 	=> Input::get('email'),
					'password' 	=> Input::get('password'),
					'active' 	=> 1	
				];

			if (Auth::attempt($auth)) {
				echo 'SUCCESS!';
			}
			else{
				echo 'False';;
			}
		}
		return Redirect::route('account-sign-in')
			->with('global', 'We are facing some problems with you sigh in.');
	}