Blog

Getting started with MARk : create a PHP data injector

The Multi-Agent Ranking framework (MARk) aims to provide all the building blocks that are required to build large scale detection and ranking systems. For this blog post we will use docker and docker-compose to run a MARk server, then we will use PHP and composer to inject data in the framework.

Read more
Test your Laravel project with GitLab

So you have a Laravel project, and as a good programmer you are using GitLab to manage your code, and you started implementing some phpunit tests. But how to run these tests in GitLab?

Read more
Laravel & Vue.js: Quickstart

Vue.js is an open-source JavaScript framework that lets you extend HTML elements with embedded JS and CSS to easily create complex user interfaces and single page applications. Easy to integrate with Laravel, this is the perfect combination to draw a line between the front and the back ends while making them both powerful.

Read more
Dockerize your Laravel app - part 2 : GitLab and multi-stage build

When dockerizing an application, the main goal is to keep images small. Hence the build process should be split in 2 steps:

Read more
Dockerize your Laravel app

For this tutorial we will start with a very simple Laravel app that has no database, or that uses a sqlite database located in the storage directory. The main goal is to show you the main pitfalls to keep in mind when dockerizing a Laravel application.

Read more
Static code analysis for Laravel

In a previous blog post we presented PHPStan, a static code analyzer for PHP. If you are developing a Laravel application, you can of course use PHPStan to validate your code. However, Laravel has a lot of subtleties and auto-magic that make static code analysis challenging. This is where Larastan comes into play: a wrapper around PHPStan that adds support specifically for Laravel.

Read more
Detect unused composer dependencies

If you are using composer to manage the dependencies of your PHP project (and you certainly should), it is very easy to end up using a lot of dependencies. And if your project lives long enough, some (or lots of them) will not be used anymore.

Read more
Implement CRUD operations in Laravel, and automatic code generation

When working with model objects in Laravel, you will typically have to implement the CRUD operations: Create, Read, Update and Delete objects from the database. To support these operations you will need to write:

Read more
Laravel : Quickstart

Laravel is an extremely powerful PHP framework for building web applications, but the first steps can be quite intimidating. In this tutorial we guide you through the first steps to get you started as a breeze.

Read more
Static code analysis in PHP (and GitLab)

In the PHP toolbox for testing, you'll often find phpunit for unit testing, PHP_CodeSniffer for code style analysis, and here we present PHPStan for static code analysis.

Read more
Manage VirtualBox with PHP

phpVirtualBox is a well known web interface for managing virtual machines. There is however another less known library that allows to manage virtual machines from your own PHP applications : php-vbox-api. The API allows you to do stuff like:

Read more
Understanding Laravel middleware : admin users

In Laravel, a Middleware is basically a piece of code that should be executed for every http request. Middlewares are typically used to:

Read more
Apache Spark MapReduce with PHP

When it comes to Big Data processing, I'm a huge fan of the Apache Spark project. Spark is a very powerful tool to analyse very large datasets in parallel, and at the same time it provides a nice API that allows to write clean distributed code.

Read more
An introduction to Laravel ORM : Eloquent

When working with an object oriented language, like PHP, Java or Python, an Object-Relational Mapping (ORM) tool allows to automatically convert model objects into rows in a database and vice-versa. It allows to easily save objects in a database, without worrying about writing appropriate SQL requests.

Read more
Using Laravel with a SQLite database

For a development environment or for small web applications, a SQLite database may be perfectly sufficient to store your data. It is also much lighter than a full blown MySQL database.

Read more