Laravel Encryption and Hashing
January 16, 2026
•
1 min read
•
23 views
Table of Contents
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(),
]
Related Posts
Laravel Sanctum API Authentication Complete Guide
Build secure API authentication with Laravel Sanctum for SPAs and mobile apps.
Laravel Rate Limiting: Protect Your Application
Implement rate limiting to protect your Laravel application from abuse.
Laravel Blade Components: Build Reusable UI
Create powerful reusable components with Laravel Blade.
Comments (0)
No comments yet. Be the first to comment!