Migrate Routines to Laravel

I had to work on a project that made heavy use of MySQL routines: stored procedures, views, functions and triggers. In the process of adding Laravel to the application, I found good packages to seed the database from existing data, create models from the existing schema and create migrations from existing tables. However, I could not find anything to migrate the existing routines as a migration. I needed this to be able to make the existing application work when seeding a new database....

December 22, 2019 · 2 min · Adrien Poupa

Zero Downtime Laravel Deployments with Laravel Envoy

Recently, I was looking for a way to deploy a Laravel application with ease and no headache. After some time, I wrote a very basic Bash script to automate the common deployment tasks: pulling changes from Git, installing Composer dependencies, building NPM scripts, running migrations and so on. But it was still feeling primitive. There had to be a better way. After some research, I found Laravel Envoyer. This service offers everything I needed but I was not ready to pay the costs associated....

June 2, 2019 · 6 min · Adrien Poupa

An Empirical Study of Performance in Laravel Applications

As part of my Software Verification and Testing class at Concordia University, my team and I chose to study empirically the performance of some popular Laravel applications. The goal was to replicate the paper “How not to structure your database-backed web applications: a study of performance bugs in the wild” by Junwen Yang et al. This paper, focused on the Ruby ecosystem, found that ORM API misuses such as inefficient queries, lack of pagination, inefficient eager loading or lazy loading were common causes for performance degradation....

January 11, 2019 · 4 min · Adrien Poupa

Laravel : envoi du token CSRF lors d'un appel Ajax

Lors d’une requête POST en Ajax sous Laravel 5, il faut passer le jeton CSRF sous peine de recevoir une erreur de TokenMismatch, la protection contre les failles CSRF s’activant. Pour ce faire, je ne trouve pas la documentation très simple, alors qu’il suffit de passer l’attribut ‘_token’ dans le champ data (sous jQuery). Ainsi, il n’y a qu’une ligne à rajouter : $.ajax({ type: "POST", url: "{{ url('/votre-url') }}", data: { ....

April 25, 2016 · 1 min · Adrien Poupa