Skip to content

Checks a single database Model Field for a matching hash from plain text

License

Notifications You must be signed in to change notification settings

webciter/check_hashed_string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

check_hashed_string

Checks a single database Model Field for a matching hash from plain text

usage

    $user = Auth::guard("api")->user();
    
    /* validate the form data */
    $validatedData = $request->validate([
        "current_password" => "required|string|min:8|check_hashed_string:\App\User,{$user->id},password",
        "email_address" => "required|string|email|max:255|confirmed|unique:email_addresses"
    ], $customErrorMessages);

The third parameter to the validation rule will be consistent to the options of the Hash Facade.

About

Checks a single database Model Field for a matching hash from plain text

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages