Class 'App\Rules\Hash' not found in Laravel

This error occurs when you forget to import class Hash to your MatchOldPassword rules in app\Rules directory. To avoid this error Class 'App\Rules\Hash' not found you have to import Hash facade in your match old password rule.

Answers 1
  • Class 'App\Rules\Hash' not found

    --PATH app\Rules\MatchOldPassword.php
    use Illuminate\Support\Facades\Hash;
    
    0

    You have to import Hash facade in your match old password rule in app\Rules\MatchOldPassword.php file.

  • Back to code snippet queries related laravel