Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

The benefits of creating packages

Original – by Freek Van der Herten – 1 minute read

In the last few months various little parts of our custom built CMS were made available as composer installable packages. Though creating a package takes some time, there are many benefits: my colleagues and my future self can benefit from the same documentation that is written for the consumers of…

Read more

Manage newsletters in Laravel 5

Original – by Freek Van der Herten – 1 minute read

A few hours ago I tagged version 1.0.0 of a my new package: laravel-newsletter. It provides a very easy way to interact with email marketing services. Or maybe I should simply say MailChimp, as it is currently the only supported supported service. After you install the package (un)subscribing an…

Read more

MailChimp API v3 is officially launched

Link –

V2.0 of the API was a weird hybrid of RESTful and RPC practices, which required everyone to learn our own special style of API design. With a few minor exceptions, API v3.0 is fully RESTful. This allows us to express in a couple dozen resources what it took the last version 120 distinct endpoints to accomplish.
http://devs.mailchimp.com/blog/api-v3-0-officially-launched/

Consuming this API doesn't seem to be that hard but I hope they'll release a PHP wrapper soon.

Read more

Modern PHP hosting

Link –

Over at the Fortrabbit-blog grown up graffiti kid Frank Lämmer provides an excellent overview of what your options are when looking for PHP-Hosting.

Let’s face it: web hosting is a market for lemons. There are so many providers. New categories are emerging. Borders blur. Microservices everywhere. It’s complex. It’s noisy. It’s hard.
http://blog.fortrabbit.com/php-hosting-possibilities

I used to work with providers that offered sharing hosting that could be administered with tools like Plesk and cPanel. The biggest drawbacks of shared hosting are that these environments don't get updated regularly and you can't really install all the tools you need. We've also had serious troubles with performance in some cases (presumably caused by other users on the same machine).

Thanks to all the excellent resources on server management (like serversforhackers.com and sysadmincasts.com) and tools to provision them (like Forge) I feel confident enough to administer my own boxes. A little over a year ago all new projects at Spatie are hosted on DigitalOcean. We have multiple droplets running and haven't run into any of the problems we faced with the old school hosting providers.

Read more

Sharing controller logic with traits

Link –

We've moved our logic into a trait, a trait can be shared between many controllers without inheritance and it's more reasonable to do things with views and redirects here (though still not ideal). This in my eyes is the best solution to the problem, it's what traits are good for and it's quite convenient.
http://tech.graze.com/2015/04/14/sharing-controller-logic-with-traits-in-php/

The article provides a good overview of how the people at Graze came to this solution.

Read more

Comparing the PHP 7 and Hack Type Systems

Link –

After writing a couple small programs in Hack I've realized that it's not types themselves that make writing Hack enjoyable: it's the tight feedback loop Hack creates between the machine and myself. Integrating the Hack type checker into my editor means that my entire codebase is analyzed in a split second as soon as I save a file. This immediately surfaces any dumb, or subtle mistakes I made. I find myself writing code fearlessly: when I forget what a function returns, I just write code that calls it with what I think it returns. If I'm wrong, the type checker will tell me immediately. I can fix it quickly, and move on.

PHP has always facilitated a tight feedback loop between the machine and the developer. Save the file, reload the browser, repeat. Hack's type checker makes this even faster. I look forward to being able to build similar tooling on top of PHP 7's strict mode.

http://www.dmiller.io/blog/2015/4/26/comparing-the-php7-and-hack-type-systems

Read more

Forty computer science concepts explained in layman’s terms

Link –

http://carlcheo.com/compsci

A handy list for when talking with your project manager. An example:

Asymmetric cryptography

Sharing identical keys works fine among 2 people. What if Alice want to exchange stuff with another guy named Carl, and Alice doesn’t want anybody to see their stuff too? Alice can’t use the same lock and key that she shared with Bob, else Bob can unlock the box easily!

Of course Alice can share a completely new and different lock and key with Carl, but what if Alice wants to exchange stuff with 10 different people? She will need to keep and manage 10 different keys!

So Alice come out with a brilliant solution. Now, she only maintains one key (private key). She distribute the same padlocks (public key) to her friends. Anyone can close the padlocks (encrypt), but only she has the key to open (decrypt) them. Now, anyone can send stuff to Alice using the padlock she distributed, and Alice no longer have to manage different keys for different people.

Read more

A medialibrary package for Laravel 5

Original – by Freek Van der Herten – 3 minute read

At Spatie all our greenfield projects are powered by custom built CMS based on Laravel 5. An important part of the CMS is the medialibrary-component. It handles how uploaded files are associated with models. My intern and I recently took the time to release our medialibrary as a package on GitHub.…

Read more

Comparing the PHP 7 and Hack Type Systems

Link –

After writing a couple small programs in Hack I've realized that it's not types themselves that make writing Hack enjoyable: it's the tight feedback loop Hack creates between the machine and myself. Integrating the Hack type checker into my editor means that my entire codebase is analyzed in a split second as soon as I save a file. This immediately surfaces any dumb, or subtle mistakes I made. I find myself writing code fearlessly: when I forget what a function returns, I just write code that calls it with what I think it returns. If I'm wrong, the type checker will tell me immediately. I can fix it quickly, and move on.
http://www.dmiller.io/blog/2015/4/26/comparing-the-php7-and-hack-type-systems

Read more

Private npm modules

Link –

When you pay for private modules, you can:
  • Host as many private packages as you want
  • Give read access or read-write access for those packages to any other paid user
  • Install and use any packages that other paid users have given you read access to
  • Collaborate on any packages that other paid users have given you write access to
Publish unlimited private modules for just $7/month.
https://www.npmjs.com/private-modules

Read more

PHPeople

Link –

Over at the Fortrabbit blog you'll find a great list containing various influencers of the PHP ecosystem.

... we have to have an eye on future trends. So we are monitoring what’s going on in the open source PHP world. It’s fun watching all those interesting projects out there. But it’s not about technology only. You’ll need to know about the people driving the projects to understand what’s going on. What are the visible, vocal & visionary PHPeople up to?

Read more

10 Years of Git: An Interview with Git Creator Linus Torvalds

Link –

So I'd like to stress that while it really came together in just about ten days or so, it wasn't like it was some kind of mad dash of coding. The actual amount of that early code is actually fairly small, it all depended on getting the basic ideas right. And that I had been mulling over for a while before the whole project started. I'd seen the problems others had. I'd seen what I wanted to avoid doing.
http://www.linux.com/news/featured-blogs/185-jennifer-cloer/821541-10-years-of-git-an-interview-with-git-creator-linus-torvalds

The source code manager to build git was... git.

Read more