O'Reilly logo

Learning Laravel 4 Application Development by Hardik Dangar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Security in Laravel

One important aspect of managing web applications is security. There is a new security threat looming every few days. Let's see how Laravel helps secure our application and what things we would need to add to our application to make it secure.

Laravel's default authentication provides AES-256 encryption to passwords via a 32-bit key generated during the installation of Laravel in app/config/app.php. We can also use these algorithms to encrypt things in our application. In other words, if you want to encrypt confidential data, you can encrypt it as follows:

$encrypted = Crypt::encrypt('secret');

If you want to decrypt it, you can use the decrypt function as follows:

$decrypted = Crypt::decrypt($encryptedValue);

Similarly, Laravel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required