Laravel Class 'HASH' not found
laravel, laravel-4, php
Solution
It should be `Hash::make`, not `HASH::make`.
Problem
after validate rules i want to check current enterd password width saved hash password on database.and i'm using this below code, but i get error : Error Code: ``` Symfony \ Component \ Debug \ Exception \ FatalErrorException Class 'HASH' not found ``` my Controller Action: ``` public function update($id) { $rules = array( 'name' => 'required|alpha', 'family' => 'required', 'email' => 'required', 'password' => 'required|confirmed', 'password_confirmation'=>'required', ); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { return Redirect::to('/admin/profile') ->withErrors($validator) ->withInput(); } else { $currentPassword = User::find($id); if ( $currentPassword == HASH::make(Input::get('currpassword')) ){ return Redirect::route('/admin/profile') ->with('message', 'Password Match Error') ->withInput(); } } } ```