Engineering note · Laravel

Hash Passwords Securely

By Published Updated

Laravel

Always hash passwords using Laravel's built-in Hash facade. Never store plain-text passwords in your database.

CODE SAMPLE Code snippet
use Illuminate\Support\Facades\Hash;

// Storing a hashed password
$user->password = Hash::make($request->input('password'));
$user->save();

// Verifying a hashed password
if (Hash::check($request->input('password'), $user->password)) {
    // Password is valid
}

More engineering notes

Cache Blade Views for Faster Rendering

Cache rendered Blade views to store compiled templates and reduce server processing time. Laravel's...

Composer Packages with Version Constraints

Control which versions of Composer packages should be installed in your project using version constr...