Laravel

The Laravel framework.

Laravel action/access control with policies

When developing a web application with Laravel, you will usually have to deal with different users, that have different permissions. If the application is quite simple, with only 2 types of users (administrators that are almighty and regular users that have no permission) you can use a middleware to protect your administrator's area. In this blog post we look at Laravel policies, that allow fine-grain control of user actions.

Read more
Secure Cookies with Laravel

No. Setting HTTPS is not enough to ensure that your cookies are encrypted. But Laravel proposes some very simple ways to achieve that.

Read more
Laravel optimization : self-hosted fonts

By default, Laravel (and Bootstrap) applications use fonts (like Nunito or Raleway) that are provided and hosted by Google. This is easy to use for developers, but comes with some drawbacks, including a performance penalty. Luckily, there is an open source project that makes it simple to use self-hosted fonts: fontsource.org

Read more
Laravel optimization : reduce CSS size

CSS files are a render blocking resource: the browser waits for your CSS files to be downloaded before rendering the page. This means that, as long as the browser is downloading CSS, the user is waiting in front of a black page...

Read more
Run a development environment for Laravel with docker-compose

Developing and testing a Laravel project requires to install a substantial number of tools, with the correct version of each: PHP, composer, MySQL database, NPM etc. Moreover, for a substantial project, you will also have to run and test a queue worker and a scheduler. This can become quite complex and long to setup. In this blog post we show how to use docker-compose to run all of these in a single command line...

Read more
Laravel database transactions & mysqldump

Did you know that mysqldump can create inconsistent backups if you do not use database transactions in Laravel? Let's discover that issue and address it in order to avoid it. After setting up and running locally a Laravel project that will serve as a demo for that specific issue, we will observe the necessity of using transactions and how to implement them. We'll also discover many more tips while trying to understand what happens under the MySQL hood.

Read more
Laravel optimization : static content caching and cache busting

Optimizing you web app from the browser side is an important concern, to provide a pleasant experience to your users. It will also reduce the traffic on your servers. In this post we show how to implement static content caching and cache busting on a Laravel application.

Read more
Harden your Laravel app with CSP headers

CSP (Content Security Policy) reduces the risk of cross-site scripting and other content-injection attacks by defining, at the level of the webserver, a header that whitelists authorized sources of content for your website.

Read more
Run your Laravel application on Kubernetes

In this blog post series we will present how to deploy a Laravel app on Kubernetes. In this first tutorial, we start with a simple setup, and leave horizontal scaling and high-availability for a follow-up post...

Read more
Laravel Custom Logging

For the majority of developed program, it is necessary to use a robust and efficient Log mechanism. It is of course the case for a web interface. It is important to be able to track potential bugs or issues.

Read more
Implementing email verification in Laravel

Have you ever wanted to ensure your users use email addresses they actually possess? Here is a quick way to achieve it. This tutorial assumes that you already have:

Read more
Run your Laravel app with docker-compose

Docker-compose is an elegant way to run a Laravel app. It allows to define and run the different services: the main web app, a MySQL database and a redis server. There are however a few tricks to solve: how to run the database migrations, how to run the queue worker and the scheduler?

Read more