Support the ongoing development of Laravel.io →
Authentication Database Forms

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);
    

});

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.