Blog /

General

General April 4, 2024

Encryption and the In-between

Last year, we introduced a simple but surprisingly useful feature to Laravel Forge: the ability to add notes to servers. While checking the uptake of this feature, we noticed that customers were often storing sensitive data in the field. We hadn’t designed notes to store sensitive information, so we found ourselves in a situation where we now needed to encrypt existing unencrypted data, while also allowing for new data to be inserted as encrypted data - at the same time, the dashboard needed to be able to show the notes correctly whether they had been encrypted or not. Our migration process looked like this: 1. Run a command that encrypts all existing unencrypted server notes. 2. Update our model to cast the `notes` field, encrypting or decrypting as required. To do this, we leaned on [Laravel’s custom casts](https://laravel.com/docs/11.x/eloquent-mutators#custom-casts) feature to handle this “sometimes encrypted” data. We created a new cast `SometimesEncrypted` that allowed us to gracefully decrypt the encrypted notes, or simply return the plaintext version which may have been available during the migration: ```php

James Brooks

General December 19, 2022

Laravel Loves PHP 8.2

Last week saw the official release of PHP 8.2, bringing with it features such as read-only classes, DNF types, and much more. As you may have noticed, we've been busy preparing the Laravel framework, first-party packages, and the surrounding ecosystem to provide support for this exciting new release of PHP. ## Laravel If you want to use PHP 8.2 with your Laravel project, you should update your dependencies to use the latest versions of the framework as well as the latest versions of all first-party packages such as Cashier, Passport, Scout, etc. ![image](https://laravel-blog-assets.s3.amazonaws.com/cuNz2q7vmF8us0h934JhSY5hprK8lAAZPXw0siF4.png "image") Of course, you should also ensure you update any third-party packages accordingly. ## Forge If you use Forge to provision servers and deploy your applications, you may now select PHP 8.2 when creating a server. ![image](https://laravel-blog-assets.s3.amazonaws.com/yB1Yo6zGuJFpwyQIJeOW1SoD5ZWwiU7Tdh23c1cC.png "image") You may also install PHP 8.2 on existing servers from the "PHP" tab of your server's management dashboard. ![image](https://laravel-blog-assets.s3.amazonaws.com/PeQjgVeQlbYkqJGMyEw4N6eZVb8Q8nfVL7wAdzlR.png "image") ## Vapor We have also updated Vapor to provide PHP 8.2 support for our native and Docker runtimes. To update your native runtime to PHP 8.2, set the `runtime` option of your application's `vapor.yml` file to `php-8.2:al2` and redeploy your application. ![image](https://laravel-blog-assets.s3.amazonaws.com/O3QpHQ2GEvCxUCvkw59b8xiDvInhFqsOwIHd5PfV.png "image") If you are using the Docker runtime, you may update the base image in your Dockerfile to `laravelphp/vapor:php82` and redeploy your application. ![image](https://laravel-blog-assets.s3.amazonaws.com/6Lfm3nfio9eUHv9z0oNdEzfdrZH5NOyuOHxbps9I.png "image") ## Envoyer If you use Envoyer to manage your application's deployments, you may now select PHP 8.2 from your server's settings. ![image](https://laravel-blog-assets.s3.amazonaws.com/FswmEfdErIUr7iFQKQZkKM5TyEWEs3jbNawQOQfI.png "image") At Laravel, we're committed to providing you with the most robust, modern, and developer-friendly PHP experience. We hope you're as eager as we are to get started with PHP 8.2. With these updates to the ecosystem, it really couldn't be simpler!

Joe Dixon

General August 9, 2022

Laravel: New DB Commands

Following last week's release, which again focused on Artisan, this week Laravel v9.24 introduces three new DB commands and more.

Taylor Otwell

General July 19, 2022

Laravel: New "about" Command

Following on from the recently introduced fresh new look for Artisan, we took some time to identify new Artisan commands to further improve the Laravel experience. Another newly introduced command is "about". This command displays information about your application's environment.

James Brooks

General July 19, 2022

Laravel: New "model:show" Command

Following on from the recently introduced fresh new look for Artisan, we took some time to identify new Artisan commands to further improve the Laravel experience. One of the newly introduced commands is "model:show". This command dumps out the model and table highlights for the given model.

Jess Archer

General July 19, 2022

Laravel: Refreshing Artisan

On today's release of Laravel v9.21.0, we’re bringing you a fresh new look for Artisan: a brand new console output on the vast majority of Laravel commands that deliveries a better console experience, and displays more information in commands such as "migrate" or "queue:work".

Nuno Maduro

General January 6, 2022

Managing Disk Space With "ncdu"

Linux ships with a useful command called `du` (Disk Usage), which is used to find the size of files and directories. When provisioning your server, Forge installs `ncdu` which is an advanced version of `du` that allows you to easily navigate your directories via an ncurses interface. This makes it much quicker to identify large files and directories.

James Brooks

General December 15, 2021

Servers for Artisans: The Next Generation

During Laracon NYC 2014, Taylor Otwell, the creator of Laravel, announced both Laravel Homestead and Laravel Forge, instantly simplifying the entire process of building Laravel applications - from first download to final deployment.

Claudio Dekker

General December 15, 2021

Log4j Vulnerability Update

Log4j is a Java library by Apache used to log debug messages within applications. It's recently been featured in news outlets around the world due to a vulnerability (known as Log4Shell) that was discovered allowing remote code execution using a specific string.

James Brooks

General April 28, 2021

Security: SQL Injection in SQL Server "LIMIT" / "OFFSET"

Today we have released security patches via Laravel 6.20.26 and 8.40.0. These patches resolve a security vulnerability that allowed SQL injection when unfiltered user input was passed directly to the `limit` and `offset` methods of the Laravel query builder and the user was also using Microsoft SQL Server as their database. Other database drivers such as MySQL and Postgres do not appear to be affected by this problem at this time. All Laravel users are encouraged to update immediately, or, if you are unable to update to these versions, ensure that you are only passing integers to the `limit` and `offset` methods. This security vulnerability has been published as a GitHub security advisory: https://github.com/laravel/framework/security/advisories/GHSA-4mg9-vhxq-vm7j

Taylor Otwell

Showing 1 - 10 of 22 results

Stay connected with the latest Laravel news