Welcome to my blog!

Go to the homepage or look at my talks

It seems that you do not use an AdBlocker, I think you should! Ads are bad for our brains and the web doesn't need them. You can download uBlock here.
Improvements of the new Responsable interface in Laravel

Improvements of the new Responsable interface in Laravel July 26, 2017

The new Responsable interface in Laravel is really awesome, it allows us to simplify our controllers with custom responses objects.

But one of the complexity with responses is the content negotiation and the new feature doesn’t help us on this. How could we solve this problem?

Your app doesn't have

Your app doesn't have "users" July 18, 2017

I’m a big fan of Laravel. The thing I like the most about the community is the focus on understandable code. Not patterns, not architectures, but how to choose the best API for a task so the result is readable as plain English.

But today, I want to talk about one name that Laravel’s developers often get wrong.

Pattern Matching in PHP

Pattern Matching in PHP February 13, 2017

I’m a big fan of Haskell and one of my favorite feature of this awesome language is pattern matching. If you don’t know what’s pattern matching, it’s this:

data Customer = Student | Individual

getPrice :: Customer -> Int
getPrice Student    = 10
getPrice Individual = 30

The main advantage is, if I add a possibility in my type, for example data Customer = Student | Individual | Company, the Haskell compiler will tell me that my function is missing a pattern. I will need to provide a getPrice Company = ?.

Of course, in PHP we don’t have a compiler but we can still have some checks…

Laravel Recursive Migrations

Laravel Recursive Migrations December 15, 2016

I’m currently developing the Quantic Telecom website with Laravel. My app folder is well-organized as my views and my resources but not my migrations because the Laravel php artisan migrate command doesn’t run nested migrations. My package thibaud-dauce/laravel-recursive-migrations will allow us to put migrations into sub-directories.

In this blog post, I will go through the development of this package. For information, I found two links speaking about this particular problem: on StackOverflow “Laravel running migrations on “app/database/migrations” folder recursively” and this issue on Github “[Proposal/Enhancement] Artisan CLI Migrate command does not go through all sub folders of the migrations folder.”

The goal of my package is not to create new commands like submigrate, submigrate:rollback… I want to keep the original names migrate, migrate:rollback and add an option --recursive which will look into all sub-directories.

Laravel Foreign Relations

Laravel Foreign Relations December 7, 2016

The Laravel community is a huge fan of Stripe. As Laravel, Stripe provides a great API to interact with the product. In this article, I’ll create a proof of concept using Laravel’s Eloquent relations to fetch a foreign data source as Stripe. The same idea could be applied to other foreign data providers.

Welcome 2016: IPv6, HTTPS & HTTP/2.0

Welcome 2016: IPv6, HTTPS & HTTP/2.0 March 5, 2016

It’s been a few weeks since a set a AAAA record for my domain name and allow IPv6 to visit my website. Same with SSL and Let’s Encrypt. Today I switched from Apache 2 to Nginx and enabled HTTP/2.0 on my server.

Tips & Tricks with LaTeX

Tips & Tricks with LaTeX February 12, 2016

In my previous blog post, I talked about how LaTeX is a fantastic tool and I concluded with some generators that could be interesting. I had to write some documents with LaTeX and I wanted to improve my work flow. I will share with you some tips & tricks I discovered.

Automate deployment with Ansible

Automate deployment with Ansible January 24, 2016

It’s been a while since I wrote my last blog post. Today, I want to share with you my small experience with Ansible. Ansible is an open source project for application deployment. I heard of it last year but never took the time to dig in. Last week, I gave it a new try for Quantic Telecom to deploy new containers easily and I really enjoy it!

Maybe it's now an option to avoid NullPointerException?

Maybe it's now an option to avoid NullPointerException? December 19, 2015

NullPointerException is an obvious runtime problem in most Java applications. But it’s not limited to Java, in PHP for example we could get a “Trying to get property of non-object”. But today, there’s a compilation alternative to this runtime problem.

UX fails: moving elements December 12, 2015

What’s UX? UX stands for User Experience. It refers to “a person’s emotions and attitudes about using a particular product, system or service” according to Wikipedia. I’m starting today a series of blog posts about UX and some fails I ran into on software I use every day.