Best of PHPApril 2025

  1. 1
    Article
    Avatar of lnLaravel News·1y

    NativePHP v1 is finally here!

    NativePHP v1.0.0 has been released, enabling Laravel developers to build distributable desktop apps across major platforms. This milestone allows for faster realization of internal tools, consumer-facing apps, and hobby projects. The release drops support for Laravel 10 and PHP 8.1/8.2, highlighting the need for compatible tooling and dependencies. Upgrading is straightforward, with instructions provided for both existing and new users.

  2. 2
    Article
    Avatar of lnLaravel News·1y

    Laravel Unique

    Laravel Unique is a package that provides a trait for Laravel Eloquent models to maintain field uniqueness within specified constraints. It supports custom suffix formats and value generators, and can be configured via a config file or model properties. The package enforces application-level uniqueness before saving, making it suitable for use cases like unique names, slugs, or identifiers.

  3. 3
    Article
    Avatar of lnLaravel News·1y

    PHP DevTools Console

    PHP DevTools Console is a new Chrome extension designed specifically for PHP developers, especially those working with Laravel. Created by Tony Lea, the extension integrates Spatie's Laravel Web Tinker package into the browser's dev tools. This allows developers to access PHP and Laravel Artisan Tinker console capabilities seamlessly within the browser. The extension is recommended for development use only and should not be used in production environments.

  4. 4
    Article
    Avatar of collectionsCollections·52w

    Laravel Solves the N+1 Problem Efficiently

    Laravel version 12.8 offers a new feature to efficiently handle the N+1 problem by automatically eagerly loading related data. This enhancement reduces the number of queries required, minimizes performance bottlenecks, and simplifies the development process.

  5. 5
    Article
    Avatar of stitcherstitcher.io·51w

    PHPverse 2025

    On June 17th, JetBrains is hosting PHPverse 2025, a free online event celebrating PHP's 30th anniversary. The event will feature talks and Q&A sessions with notable figures from the PHP community, exclusive gifts, and more. Registration is required.

  6. 6
    Article
    Avatar of freekFREEK.DEV·1y

    Goodbye reCAPTCHA, hello Turnstile

    Explore reasons behind the transition from reCAPTCHA to Turnstile, highlighting the benefits of Turnstile for modern web applications and its integration with the Laravel framework. The post also mentions resources for PHP developers, including a newsletter containing tips, tutorials, and opinions with a focus on Laravel.

  7. 7
    Article
    Avatar of collectionsCollections·52w

    Learn Laravel by Building a Medium Clone – Tutorial

    Learn the Laravel PHP framework by building a Medium clone. This guide covers setting up the environment, user registration and authentication with email verification, database operations, user profile management, post management with pagination, image uploads, routing, MVC architecture, and Blade templating. Ideal for beginners and intermediate developers looking to build a complete social publishing platform.

  8. 8
    Article
    Avatar of lnLaravel News·50w

    All About the Filament v4 Beta Release

    The Filament v4 Beta release is a major update featuring nested resources, multi-factor authentication, static table data, unified schemas and actions, and performance improvements. The Beta is set to be released on June 10, 2025 at Laravel Live UK, offering developers new functionalities and enhancements for creating modern applications.

  9. 9
    Article
    Avatar of lnLaravel News·1y

    Flexible Filename Generator

    Onym is a versatile Laravel package developed by Blaspsoft for dynamic filename generation. It supports multiple strategies like random, uuid, timestamp, date, numbered, slug, and hash. The package allows customization of filenames, extensions, and additional formatting. It integrates well with Laravel's filesystem and configuration, ensuring structured and collision-free filenames. The package is extensible, allowing developers to add or modify filename strategies. Installation is straightforward using Composer.

  10. 10
    Article
    Avatar of lnLaravel News·1y

    Whisp is a PHP SSH Server

    WhispPHP is a pure PHP SSH server designed by Ashley Hindle to simplify building PHP SSH apps. It allows running Laravel Prompts apps via SSH with ease. You can start a new project using a provided template or add Whisp to an existing project using Composer. It supports app auto-discovery and provides example apps and documentation for developers. Upcoming features include a Laravel-specific package and a Docker image.

  11. 11
    Article
    Avatar of freekFREEK.DEV·51w

    DevOps With Laravel: Queues and Workers in Production

    Marin Joo discusses configuring Supervisor to manage worker processes in Laravel applications, including defining commands, scaling, and logging. The post also explores using multiple queues and prioritizing them to enhance worker usage and performance.

  12. 12
    Article
    Avatar of lnLaravel News·52w

    Laravel Simple RabbitMQ Package

    The Simple RabbitMQ package for Laravel simplifies using RabbitMQ by supporting multiple connections, easy publishing, and consumer mode. You can configure queues and exchanges via Laravel's service container and manage them in a configuration file. The package uses php-amqplib as the RabbitMQ client and offers fluent, chainable syntax for message handling.

  13. 13
    Article
    Avatar of lnLaravel News·1y

    Screen is a terminal renderer written in pure PHP

    Screen is a terminal renderer created by Aaron Francis, written in pure PHP, and powers Solo for Laravel. It helps build rich text-based user interfaces in PHP applications without being a standalone terminal application. Key features include full ANSI support, Unicode/multibyte handling, buffer management, correct character width handling, and support for vertical scrolling.

  14. 14
    Article
    Avatar of lnLaravel News·51w

    Safely Retry API calls in Laravel

    Idempotency for Laravel is a package that allows clients to safely retry API calls without processing duplicates. Using a unique Idempotency-Key header, identical API requests return the original response without repeated execution. Key features include robust caching, lock-based concurrency control, comprehensive telemetry, alert system, payload validation, and detailed logging. Installation instructions and source code are available on GitHub.

  15. 15
    Article
    Avatar of freekFREEK.DEV·1y

    Implementing Multitenancy in Laravel

    The post covers a talk given by the author at Laracon India about implementing multitenancy in Laravel using the laravel-multitenancy package. The package is used to make Mailcoach tenant aware, with practical tips and a demonstration provided.

  16. 16
    Article
    Avatar of freekFREEK.DEV·50w

    Laravel Observers vs Event Listeners: What’s the Difference?

    The post discusses the differences between Laravel observers and event listeners, helping developers understand how each concept works and when to use them.

  17. 17
    Article
    Avatar of exakatExakat·52w

    PHP parentheses usage

    In PHP, parentheses serve various roles depending on their usage. They can be compulsory for code to compile correctly, optional for clarity or precedence, and sometimes completely unnecessary. They play a crucial role in function definitions, method calls, control structures, and grouping expressions. Parentheses also help in managing operator precedence and improving readability, though they can occasionally lead to confusing or redundant code. It's crucial to understand the contexts in which they are beneficial or required to write effective PHP code.

  18. 18
    Article
    Avatar of communityCommunity Picks·51w

    Tricking Laravel Into Auto-Loading Routes

    Discover a method to handle increasing routes in a Laravel application by auto-loading them. This technique utilizes a function within AppServiceProvider to automatically manage routes without manual updates.

  19. 19
    Article
    Avatar of newstackThe New Stack·51w

    New Framework Uses PHP for Native Desktop Apps

    NativePHP has released version 1 of its framework, enabling PHP developers to build cross-platform native desktop applications using PHP, HTML, CSS, and JavaScript. React Native's latest version boosts Android app startup time by reducing the need to uncompress JavaScript bundles. Andrej Karpathy expresses frustration with web development, comparing it to assembling IKEA furniture due to the need to configure various individual services.

  20. 20
    Article
    Avatar of lnLaravel News·51w

    Converting Array Values to Enum Instances with Laravel's mapInto Method

    Laravel simplifies the conversion of array values into PHP enum instances using the Collection::mapInto method, enhancing type safety and maintainability. This method is particularly useful when handling user input, providing an elegant way to transform raw data into strongly-typed enum instances in various application logic scenarios.

  21. 21
    Article
    Avatar of lnLaravel News·52w

    Memoized Cache Driver in Laravel 12.9

    Laravel 12.9.0 introduces a memoized cache driver, relationship autoloading for model instances, a DB transaction failure callback, updated freezeTime testing methods, improved error messages for assertViewHas(), and a Fluent::make() method. Explore the release notes for a full list of changes.

  22. 22
    Article
    Avatar of lnLaravel News·50w

    Celebrate 30 years of PHP at PHPverse

    PHP is celebrating its 30th anniversary with PHPverse 2025, a virtual event hosted by JetBrains. It features talks from notable PHP leaders and covering topics such as PHP's evolution, the future of its development, and how AI is impacting technology. The event is free to attend and will be streamed live on YouTube.

  23. 23
    Article
    Avatar of lnLaravel News·1y

    Enhancing Database Error Diagnostics with Laravel's getRawSql

    Laravel's new getRawSql method enhances database error diagnostics by providing fully integrated SQL queries with all bindings. This simplifies and speeds up debugging processes, enabling developers to quickly identify and resolve database issues. The method proves valuable for error monitoring services and can be seamlessly added to Laravel's exception handling system.

  24. 24
    Article
    Avatar of lnLaravel News·1y

    Feature Flags with Laravel Pennant

    Learn to implement feature flags in Laravel using Laravel Pennant. This tutorial covers installation, configuration, setting up feature definitions, creating custom logic for feature access, activating features via the command line, and applying feature-gated content in views. It presents a simplified method for gradually rolling out features in Laravel applications.

  25. 25
    Article
    Avatar of lnLaravel News·1y

    Eloquent Fill and Insert Method in Laravel 12.6

    Laravel 12.6.0 introduces several new features including the Eloquent fillAndInsert method for merging model attributes, a URI path segments helper, and an appliedRules method for password validation. Additionally, the update includes enhancements such as prohibiting the db:seed command and improving the model:prune command to continue running after an exception.