Posts tagged with php

Laravel Permission v7 has been launched

by Freek Van der Herten – 3 minute read

Laravel's built-in authorization is great when permissions are defined in code. With gates and policies, you can write logic like this:

// Defined in code, requires a deploy to change
Gate::define('edit-posts', function (User $user) {
    return $user->is_admin;
});

But in some projects roles and permissions are dynamic: created by users, managed through an admin panel, or changed at runtime without deploying code. Our Laravel Permission package can help you dynamically create roles and permissions.

We just released v7 which doesn't bring any new features, but cleans up the internal code and modernizes it. Let me walk you through what the package can do.

Read more

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

Laravel Fuse: Circuit breaker for queue jobs

github.com

Laravel Fuse is a circuit breaker package for Laravel queue jobs. When an external service like Stripe or Mailgun goes down, instead of letting thousands of jobs timeout (30s each), the circuit opens after a configurable failure threshold and jobs fail instantly. It supports three-state circuit breaking (closed/open/half-open), intelligent failure classification (429s and auth errors do not trip the circuit), peak hours config, and a built-in status page.

Read more [github.com]

The Origin of Laravel - a look at v1 Beta 1

laravelnepal.com

A fascinating deep dive into the very first commit of Laravel, made by Taylor Otwell on June 9, 2011. The article explores the original directory structure, the early Eloquent ORM, the session system with its clever flash data prefixing, and the authentication basics that are still recognizable in today's framework.

Read more [laravelnepal.com]

Laravel PDF v2 has been released: adds support for Laravel Cloud and easy queuing

by Freek Van der Herten – 6 minute read

A while ago, we released laravel-pdf, a package to generate PDFs in Laravel apps.

Under the hood, it used Browsershot (and therefore Puppeteer/Chrome) to convert HTML to PDF. That approach works great, but it does require Node.js and a headless Chrome binary on your server.

Last week, my buddy Dries shared on X how to generate PDFs using Cloudflare services. This way doesn’t require Node or any binaries. Very neat! This unlocks PDF generation for environments where Node or Chrome cannot be installed easily, like Laravel Cloud.

To support this way of rendering a PDF, we’ve released a new major release (v2) of Laravel PDF. The package now ships with three drivers: Browsershot, Cloudflare Browser Rendering, and DOMPDF. You can also create your own driver. On top of that, we've added queued PDF generation and the ability to set PDF metadata. And to let your AI understand our package, we've added a Laravel Boost skill.

Let me walk you through all of it.

Read more

Introducing Spatie Guidelines for Laravel Boost

by Freek Van der Herten – 2 minute read

If you're using AI tools like Claude Code to help write code, you've probably noticed they don't automatically know your team's coding conventions. The AI might write perfectly valid PHP, but it won't follow your specific style guide unless you tell it to. That's the problem Laravel Boost solves. It…

Read more

Leveraging Promises and HTTP Pooling in Laravel

cosmastech.com

Laravel 8 first introduced HTTP request pooling, thanks to a contribution from Andrea Marco Sartori. This allows developers to write code which will execute any number of HTTP requests concurrently. Under the hood, this is made possible thanks to the async request functionality of Guzzle and cURL’s multi handler functionality.

Read more [cosmastech.com]