PHPNews

Goodbye controllers, hello request handlers

A lot has changed in the PHP landscape over the past years. We started using more design patterns and things like the DRY and SOLID principles. But why are we still using controllers? If you have worked on large applications before, you might have noticed that you end up with bloated controllers sooner or later. …

Continue reading »

Written by jenssegers.be - - Aggregated on Friday September 22, 2017


Goodbye controllers, hello request handlers

A lot has changed in the PHP landscape over the past years. We started using more design patterns and things like the DRY and SOLID principles. But why are we still using controllers? If you have worked on large applications before, you might have noticed that you end up with bloated controllers sooner or later. …

Continue reading »

Written by jenssegers.be - - Aggregated on Friday September 22, 2017


Goodbye controllers, hello request handlers

A lot has changed in the PHP landscape over the past years. We started using more design patterns and things like the DRY and SOLID principles. But why are we still using controllers? If you have worked on large applications before, you might have noticed that you end up with bloated controllers sooner or later. …

Continue reading »

Written by jenssegers.be - - Aggregated on Friday September 22, 2017


Goodbye controllers, hello request handlers

A lot has changed in the PHP landscape of the past years. We started using more design patterns and things like the DRY and SOLID principles. But why are we still using controllers? If you have worked on large applications before, you might have noticed that you end up with bloated controllers sooner or later. …

Continue reading »

Written by jenssegers.be - - Aggregated on Friday September 22, 2017


Dynamic DNS for CloudFlare with ddclient

Today I found out that ddclient added support for CloudFlare since version 3.8.2. Unfortunately, Ubuntu 14.04 ships with version 3.8.1, but I will show you how to update it. It is actually easier to have the old version still installed because it sets up the background daemon. So make sure ddclient is installed, …

Continue reading »

Written by jenssegers.be - - Aggregated on Saturday May 21, 2016


List outdated composer packages

It has been more than a year since I opened a GitHub issue on the composer repository to propose an outdated command. It took a while, but we finally got what we asked! Vincent "Vinkla" Klaiber wrote a great blog post about how to use the new command with all available flags, go check it out: https://medium.co…

Continue reading »

Written by jenssegers.be - - Aggregated on Friday April 29, 2016


List outdated composer packages

It has been more than a year since I opened a GitHub issue on the composer repository to propose an outdated command. It took a while, but we finally got what we asked! Vincent "Vinkla" Klaiber wrote a great blog post about how to use the new command with all available flags, go check it out: https://medium…

Continue reading »

Written by jenssegers.be - - Aggregated on Friday April 29, 2016


Protect your server with fail2ban

Fail2ban is a must-have for every SSH-enabled server that is connected to the internet. It protects services such as SSH from illegitimate access. The first thing I do on every server is set up the firewall so that all ports except for the SSH port are blocked from incoming requests. But with the SSH port …

Continue reading »

Written by jenssegers.be - - Aggregated on Sunday April 24, 2016


Laravel SMTP driver vs. API drivers

After Mandrill changed their pricing model, I (as well as many others) started exploring different transactional email services. Laravel only supports a couple providers out of the box, but what about the others? All Laravel mail drivers are managed by a core TransportManager , but it was a pain in the ass to …

Continue reading »

Written by jenssegers.be - - Aggregated on Sunday February 28, 2016


Laravel SMTP driver vs. API drivers

After Mandrill changed their pricing model, I (as well as many others) started exploring different transactional email services. Laravel only supports a couple providers out of the box, but what about the others? All Laravel mail drivers are managed by a core TransportManager , but it was a pain in the ass to …

Continue reading »

Written by jenssegers.be - - Aggregated on Sunday February 28, 2016


List outdated composer packages with Climb

Composer is really missing an "outdated" command like most of the other package managers. Luckily, the Climb package has this covered! Climb checks your composer files to see which packages are outdated, regardless of your version constraints. Without Climb, there's no way of knowing if a package has a new …

Continue reading »

Written by jenssegers.be - - Aggregated on Sunday November 8, 2015


Clearing PHP's OPcache with CacheTool

OPcache is great, it improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request. But it seems like sometimes OPcache is not refreshing updated files in its cache, or that it cached a broken version of the compiled.php …

Continue reading »

Written by jenssegers.be - - Aggregated on Saturday October 31, 2015


Installing PHP 5.6 and Mcrypt on Mac OSX

Years ago I wrote a blog post on how to install the PHP mcrypt extension on OSX. But times change, and here's how you do it, for real. Disclaimer: I personally use Vagrant instead of setting up PHP and Nginx on my local machine. This allows me to quickly switch between completely different development environmen…

Continue reading »

Written by jenssegers.be - - Aggregated on Monday October 19, 2015


Using Blade outside of Laravel

For me, Laravel's Blade templating engine is one of the best templating engines I have ever used. But wouldn't it be nice to use Blade outside of a Laravel project? Blade allows you to quickly write views without the whole process of learning a complicated syntax, as most of it is just PHP code lead by an @ sign. …

Continue reading »

Written by jenssegers.be - - Aggregated on Saturday August 29, 2015