无法让Laravel 4.2哈希我的密码

时间:2015-10-02 20:08:13

标签: php laravel hash laravel-4 passwords

我已多次使用密码,但似乎无法在客户的网站上使用密码。

这是我的控制器:

class ListingController extends BaseController   {


public function create()
{

    return View::make('listing.listing');
}

public function store()
{
    $validator = Validator::make($data = Input::all(), Listing::$rules, Listing::$messages);
    if ($validator->fails())
    {
        return Redirect::back()->withErrors($validator)->withInput();
    }

    $data['passsword'] = Hash::make(Input::get('password'));

    Listing::create($data);

    return Redirect::to('/success')->with('message', 'Thank you, the listing has been submitted.');
}
}

我的表单中处理密码的部分:

<div class="form-group">                
{{Form::password('password', ['class' => 'form-control', 'placeholder' =>     'Password', 'tabindex' => '11'])}}
</div>
我是瞎了吗?错过了什么?任何帮助将不胜感激!

0 个答案:

没有答案