Articles about Laravel

How to handle an expired CSRF token nicely in Laravel

Tip published on November 19, 2016 by @markvaneijk in Laravel
Laravel throws an exception when the CSRF token in the form does not match the token saved in the session of a user for increased security and to prevent users to submit any data from remote servers to your website.
Read more about how to handle an expired csrf token nicely in laravel

Routes for authentication in Laravel 5.3

Snippet published on November 15, 2016 by @markvaneijk in Laravel
The routes that are needed for authentication controllers in Laravel 5.3.
Read more about routes for authentication in laravel 5.3

Automatically trim request input

Snippet published on December 3, 2016 by @markvaneijk in Laravel
Using a middleware we can automatically trim input from the request in your Laravel app. To make it even more useful we can automatically set empty values to null so it will be saved to your database as NULL. Clean and simple!
Read more about automatically trim request input

Log all your emails like a boss

Tip published on December 5, 2016 by @markvaneijk in Laravel
One of the things I like to do is to make sure my app saves everything it does to the database for later review. So for example when the app sends an email, I would like to check if, and when it did and to whom, so everything I could possibly want to know.
Read more about log all your emails like a boss

Automatic facades in Laravel 5.4

Snippet published on February 19, 2017 by @markvaneijk in Laravel
It's awesome. The automatic facades feature in the new Laravel, by calling your class using it's own namespace within the Facades namespace.
Read more about automatic facades in laravel 5.4