Home API Tools Posts Hire Me About
Sign In Create Account
Laravel

Laravel Encryption and Hashing

January 16, 2026 1 min read 23 views

Security with encryption:

Encrypt/Decrypt

$encrypted = Crypt::encrypt($value);
$decrypted = Crypt::decrypt($encrypted);

Model Encryption

protected $casts = [
    'secret' => 'encrypted',
];

Hashing

$hashed = Hash::make('password');
Hash::check('password', $hashed);

Password Validation

'password' => [
    'required',
    Password::min(8)
        ->letters()
        ->mixedCase()
        ->numbers()
        ->symbols(),
]
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!