I am not able to understand the error. I have put bits from logs,migrations and form and route.
-log
[2014-10-08 09:36:54] production.ERROR: exception 'ErrorException' with message 'password_hash(): Password must be a string' in C:\dev\l\authapp\vendor\ircmaxell\password-compat\lib\password.php:30
-form
<h2>New User Registration</h2>
{{Form::open(array('url'=>'register'))}}
{{Form::label('email','Email Address') }}
{{Form::text('email') }}
{{Form::label('username','User Name') }}
{{Form::text('username') }}
{{Form::label('password','Password') }}
{{Form::password('password') }}
{{Form::submit('Sign Up') }}
{{Form::close()}}
-database
Schema::create('users',function($newtable){
$newtable->increments('id');
$newtable->string('email')->unique();
$newtable->string('username',100)->unique();
$newtable->string('password',128);
$newtable->string('rember_token',100);
$newtable->timestamps();
});
-routes
Route::post('/register',function(){
$user = new User;
$user->email = Input::get('email');
$user->username = Input::get('username');
$user->pasword = Hash::make(Input::get('pasword'));
$user->save();
$theEmail = Input::get('email');
return View::make('thanks') ->with('theEmail',$theEmail);
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community