Latest

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

How to change the location hash without jumping in scroll position

Snippet published on January 18, 2017 by @markvaneijk in Javascript
One of the little annoyances when creating tabs with Javascript and changing the location hash depending on the activated tab, is that the page can jump in scroll position when changing the tab. Because the element ID is on the same page and changing the location hash makes the browser look for it and jump to it in scroll position.
Read more about how to change the location hash without jumping in scroll position

How to style placeholder text in CSS

Snippet published on December 22, 2016 by @markvaneijk in CSS
Changing appearance of the placeholder text of an input is a little quirky to do, be cause there is no standard for this CSS. So it works different in every browser, but it's possible!
Read more about how to style placeholder text in css

How to get namespace and class name in PHP from current class

Tip published on December 11, 2016 by @markvaneijk in PHP
Sometimes you just need this. One way to do this is by having to methods in your class, which returns the namespace and class name using the ReflectionClass functions in PHP:
Read more about how to get namespace and class name in php from current class

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

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

Google Analytics Referrer Spam blacklist

Link published on November 19, 2016 by @markvaneijk in Development
I've created a blacklist of all domains I could found that are abused by spammers in Google Analytics.
Read more about google analytics referrer spam blacklist

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