Laravel Route Pattern For Whole Word

If you want to match an entire word in a route pattern for Laravel 4, use the underneath snippet. Route::pattern('my_word_pattern', '^myword$'); Route::get('{my_word_pattern}/…

Read more »

Laravel form array validation, array_size, required_if

I spent a crazy amount of time on figuring out how to validate form arrays in Laravel. There is some official documentation, but like most official documentation of Laravel, it…

Read more »

Laravel Migrations: how to drop a foreign key column

Sometimes it can be desirable to remove a database column that hosts a foreign key relationship (eg: in reverse migration scripts). It can be a bit of a hassle to…

Read more »

Laravel: autocomplete for $table in migration scripts

A quick tip: if you want autocomplete (intellisense) when writing migrations in Laravel, you can add type hinting for the $table variable. Just add Blueprint before $table in the function…

Read more »

How archives get lost

The dutch tv-documentary Digital Memory Loss (Tegenlicht, Digitaal geheugenverlies) handled some interesting topics concerning the loss of libraries and internet data. To sum things up: Because of budget cuts, the…

Read more »

What does ‘composer dump-autoload’ do in Laravel?

Composer is a major part of the Laravel MVC Framework, but it also exists without Laravel. In fact you could use it in any project. This article digs into the…

Read more »

Laravel: passing data with Mail:queue() to a view

Mail:send() and Mail:queue() don’t work the same when it comes to passing $data to a view. At least not when you’re passing an eloquent object (or a “model” object). Eg:…

Read more »

Laravel and Varnish: admin interface with cookies and public pages without cookies

If you want Laravel to show cached content from Varnish on public pages (so without a cookie), but still want to use a cookie on admin pages, and switch between…

Read more »

7 issues I have with Open Source

Sorry for the clickbait title, but now you’re here, you might as well read about my thoughts (or "issues") on Open Source 1. Open source is the new demo Companies…

Read more »

Nginx: redirect a subdomain to a subdirectory without changing the url

We wanted these redirections: project.example.com => www.example.com/project (without changing the url) project.example.com/whatever => www.example.com/whatever (with changing the url) In other words: I wanted a subdomain that was nothing more than…

Read more »