Improving the performance of our PHP based crawler

Today a new major version of our homegrown crawler was released. The crawler is used to power our http-status-check, laravel-sitemap and laravel-link-checker packages. A new major feature is the greatly improved crawling speed. This was accomplished by leveraging multiple concurrent requests. Let’s take a look at the performance improvements gained by using concurrent requests. In […]

Continue reading →

Managing opening hours with PHP

For several different clients we needed to display a schedule of opening hours on their websites. They also wanted to display if a department / store / … is open on the moment you visit the site. My colleague Seb extracted all the functionality around opening hours to the newly released opening-hours package. You create […]

Continue reading →

Taking care of backups with Laravel

A new major version of laravel-backup was recently tagged. This package can backup files and databases of your Laravel app (or any PHP application really). The backup consists of a zipfile containing a dump of the databases and all files that are selected for backup. The package will copy over the zipfile to external storage […]

Continue reading →

A package to easily work with regex in PHP

PHP offers some functions to work with regular expressions, most notably preg_match, preg_match_all and preg_replace. Unfortunately those functions are a bit hard to use. Take preg_match_all for example, it requires you to pass in an array by reference to get all the matches. When something goes wrong some of those preg_ functions return false, while […]

Continue reading →

Some handy collection macros

Laravel’s collection class is truly wonderful. It contains a lot of handy methods and you can create some very elegant code with it. In client projects I found myself adding the same macro’s over and over again. That’s why my colleague Seb and I took some time to create a package aptly called laravel-collection-macros that […]

Continue reading →

Comparing laravel-mediable with laravel-medialibrary

Laravel-Mediable is a package to upload and handle all sorts of files (aka media) in a Laravel app. It was built by a Canadian based web agency called Plank. With it you can do things like this: $media = MediaUploader::fromSource($request->file(‘thumb’)) ->toDestination(‘uploads’, ‘post/thumbnails’) ->upload(); $post = Post::create($this->request->input()); $post->attachMedia($media, [‘thumbnail’]); Pretty cool. You can read more on […]

Continue reading →

Building a Laravel powered Slack bot

At Spatie we’ve recently introduced a bot to our Slack chat. We’ve named him Paolo (after the waiter in our favourite Italian restaurant in Antwerp: La Fontanella Da Enzo). Here’s a demo of Paolo (the bot) in action. Behind the scenes Paolo is powered by a Laravel application that responds to all requests Slack is […]

Continue reading →

Writing modular applications in Laravel

Nicolas Widart, author of Asgard CMS, created a new package called laravel-modules that can help splitting up a large Laravel app in modules. On his blog he published an introductory post. Just imagine having a medium sized application where everything is in the `app/ù folder, worse, every model is in the root of the app […]

Continue reading →