The Laralist

Browse past editions.

#33 - PHPย 8.4ย isย released ๐Ÿš€, Http::preventStrayRequests() ๐Ÿ’ก, Postgres and MySQL, the main differences โš–๏ธ, Laravel Custom Query Builders Over Scopes ๐Ÿ”

PHP 8.4 introduces major features like Property Hooks and Asymmetric Visibility, enhancing class property management. It also offers Lazy Objects, HTML5-compliant DOM parsing, and driver-specific PDO subclasses, improving overall performance and security.

24th of November, 2024

#32 - Laravel 11.32 Released ๐Ÿš€, withCasts() ๐Ÿ’ก, What's new in PHP 8.4 ๐Ÿ†•, How I ship projects at big tech companies ๐Ÿ›ณ๏ธ

The latest Laravel release introduces grouped scheduling to organize multiple commands. It also includes features like the `failedConnection()` method for faking failed HTTP connections, syncing Eloquent associations with arrays or base collections of models, and the `rawColumn()` method for custom column types in migrations.

17th of November, 2024

#31 - Laravel Nightwatch Announced ๐ŸŒŒ, 5 Ways to Extract Value from Overmocked Tests ๐Ÿงช, How Property Hooks Happened ๐Ÿช, SOLO ๐Ÿ“ฆ

Taylor announces Laravelโ€™s Nightwatch, a new tool that provides valuable insights into your appโ€™s performance. It helps identify slow routes, track queued job performance, and diagnose user-specific issues. With fast log search capabilities and server health monitoring, Nightwatch offers actionable data to help optimize your application.

10th of November, 2024

#30 - Laravel 11.30 Released ๐Ÿš€, Sleep helper class ๐Ÿ’ก, State of CSS 2024 Results ๐Ÿ“Š, You Want Modules, Not Microservices ๐Ÿงฉ

This release introduces `withDefer()` and `withoutDefer()` test helpers to manage deferred calls during testing. It also debuts the `HasUniqueStringIds` trait, enabling custom unique string IDs for Eloquent models to be used efficiently as route keys. Additionally, the `authorize()` method now accepts Backed Enums directly, simplifying authorization checks by allowing direct enum usage (From `$this->authorize(DashboardPermission::VIEW->value)` to `$this->authorize(DashboardPermission::VIEW)`).

3rd of November, 2024

#29 - A Case For Custom Collections ๐Ÿ—‚๏ธ, Key Principles for Writing Clean Maintainable Code ๐Ÿ“–, Exceptions::fake() ๐Ÿ’ก, Introducing Mellum: JetBrainsโ€™ New LLM Built for Developers ๐Ÿง 

The newly merged PR introduces the `CollectedBy` attribute in Laravel, enabling Eloquent models to specify custom collection classes easily, enhancing the expressiveness and encapsulation of collection logic in applications.

27th of October, 2024

Get The Laralist in your inbox

Keep up with Laravel in 5 minutes. Get the most important Laravel, PHP, & package news and reads every Sunday for free.

#28 - New composer run dev command ๐Ÿš€, Migrate pretend option ๐Ÿ’ก, That's not an abstraction that's just a layer of indirection ๐Ÿ”„, Check environmet keys ๐Ÿ“ฆ

The latest Laravel update brings exciting features! The new `composer run dev` command, added to composer.json for all new applications, launches the Artisan dev server, a queue worker, the Vite dev server, and log tailing with just one command. Additionally, the introduction of the `CollectedBy` attribute allows for custom collection classes for Eloquent models. Package authors now have the capability to register their own commands for the `optimize` and `optimize:clear` operations.

20th of October, 2024

#27 - Using 1password for Laravel environment variables ๐Ÿ”, Laravel API Course ๐Ÿ“š, Laravelโ€™s Process facade ๐Ÿ’ก, Laravel 11.27 Released ๐Ÿš€, WireSpy debug bar for Livewire ๐Ÿ“ฆ

Explore secure secret management for Laravel using the 1Password CLI. This guide discusses the benefits of effective secret management, compares tools like `artisan env:encrypt` and `git-secret`, and provides a detailed setup for integrating 1Password CLI in your deployment process, enhancing security and access control.

13th of October, 2024

#26 - A Guide to Laravel Pipelines ๐Ÿ“š, CPX - Run Composer Packages commands on the fly ๐Ÿƒ, Apply Regular Expression Constraints to route parameters ๐Ÿ’ก, OpenAI launches new 'Canvas' ChatGPT interface tailored to writing and coding projects โœ๏ธ

This comprehensive guide explores the use of Laravel's Pipeline class, detailing its application for handling complex processes through multiple stages. Learn to create, manage, and test pipelines, enhancing code maintainability and efficiency in your Laravel projects.

6th of October, 2024

#25 - Flux released ๐Ÿš€, The messy WordPress drama ๐ŸŒช๏ธ, PostgreSQL 17 Released ๐Ÿš€, Laravel Easy Metrics ๐Ÿ“ฆ, Publish stubs ๐Ÿ’ก

Flux is the official Livewire Component Library. Built by the talented team behind Livewire and Alpine.js, Flux brings a powerful set of UI components specifically designed to simplify front-end development for Laravel apps. Whether youโ€™re building dynamic, interactive interfaces or need customizable components, Flux is here to streamline your workflow.

29th of September, 2024

#24 - The Magic Behind Laravelโ€™s New Defer() Helper ๐Ÿช„, The Hidden Costs of Over-Collaboration ๐Ÿ’ผ, Window Functions for Postgres Data Analysis ๐Ÿ”, Laravel Favicon ๐Ÿ“ฆ

Explore the inner workings of Laravel's `defer()` method, which allows for the execution of callbacks after a response is sent without using queues. This article delves into its implementation and the global middleware that makes it possible.

22nd of September, 2024

#23 - LaraconUS Demoed Features available in v11.23 release ๐Ÿš€, Look out, kids: PHP is the new JavaScript ๐Ÿ‘€, Laracon US 2024 Talks Now Available ๐Ÿ“ฃ, PHP TUI ๐Ÿ“ฆ

Taylor Otwell has announced the release of several new framework features that were demoed at LaraconUS. Highlights include the new `defer()` function, which delays tasks until the response is sent. The `Cache::flexible` method implements a stale-while-revalidate pattern, refreshing the cache in the background. The `Concurrency` facade enables concurrent execution of closures. Additional updates include temporary signed URLs in the local filesystem and intuitive `when` helpers for Blade/Livewire templates. There is a new `log` function, the `firstOrFail` method for query builders, and a convenient `Skip` queue middleware for skipping queued jobs conditionally.

15th of September, 2024

#22 - Accel invests $57M into Laravel๐Ÿ’ฐ, Laravel 11.22 released includes the chaperone method ๐Ÿš€, Custom Eloquent Collections ๐Ÿ’ก, Algorithms we develop software by ๐Ÿ”จ

Laravel secures a $57M Series A investment from Accel, with Taylor Otwell reaffirming its commitment to open-source and innovation. This funding will enhance Laravel Cloud and introduce new products aimed at improving full-stack web application development.

8th of September, 2024

#21 - Taylor Otwellโ€™s Keynote at Laracon US ๐Ÿ—ฃ๏ธ, Everything We Know about Pest 3 ๐Ÿงช, Donโ€™t Ask Permission To Do Your Job Correctly ๐Ÿ’ผ, The @once directive ๐Ÿ’ก

Taylor Otwell unveiled several exciting updates in his keynote at Laracon US. Highlights include **Laravel Cloud**, a fully managed platform tailored for Laravel applications, and a **first-party VS Code extension**. Additionally, he introduced **deferred functions** for post-response processing, a new **concurrency API** for parallel processing, and **Inertia 2.0**, including features for asynchronous data loading and prefetching.

1st of September, 2024

#20 - State of Generics and Collections ๐Ÿ“š, Laravel 11.21 released ๐Ÿš€, Eloquent Power Joins ๐Ÿ“ฆ, 8 versions of UUID and when to use them ๐Ÿ”ข

Explore the evolving landscape of PHP generics, including the challenges and potential solutions. This comprehensive analysis covers reified generics, type inference, performance considerations, and alternatives like dedicated Collections syntax.

25th of August, 2024

#19 - Whatโ€™s New in PhpStorm 2024.2 ๐Ÿ†•, Implementing SaaS Usage Limits in Laravel โš–๏ธ, Boot model traits ๐Ÿ’ก, Real-time mouse pointers ๐Ÿ–ฑ๏ธ

PhpStorm 2024.2 introduces several new features, including log file support, a new floating toolbar for quick access to refactorings and AI features, terminal command completion, and AI Assistant for terminal command generation and VCS conflict resolution. Frontend updates include running and debugging TypeScript files directly, better support for major web frameworks and default Prettier integration. The new UI is now the default for all users.

18th of August, 2024

#18 - Uncle Bob Martin Announces Second Edition of Clean Code ๐Ÿ“˜, Your Laravel application with Repository doesn't make any sense ๐Ÿค”, Predictions for the future of software engineering ๐Ÿ”ฎ

Uncle Bob Martin is rewriting "Clean Code" promising a fresh approach while retaining its core principles. Expect a completely revamped presentation that breaks down complex concepts into digestible sections. While the second edition is still over a year away, fans of the original will find the enduring messages relevant until then. Stay tuned for more updates on this anticipated release.

11th of August, 2024

#17 - Laravel 11.19 released ๐Ÿš€, Simplify static page routing in InertiaJS ๐Ÿ›ค๏ธ, The EU's AI Act is now in force โš–๏ธ, UUIDv7 in 33 languages ๐ŸŒ

Laravel 11.19 brings a suite of upgrades that fine-tune both testing capabilities and query functionalities. New testing methods such as `assertSeeHtml`, `assertDontSeeHtml`, and `assertSeeHtmlInOrder` refine HTML output validations. The addition of `assertExactJsonStructure` and `withoutHeader` test methods enhances API testing by allowing precise JSON structure checks and header manipulation. On the database front, the new `whereNone` method in the query builder facilitate the exclusion of records under specific conditions. Furthermore, a method to trim unnecessary zeroes from decimal points `Number::trim(12.0); // => 12` simplifies numerical outputs.

4th of August, 2024

#16 - Handle failures in queued jobs ๐Ÿ’ก, The State of Laravel Survey 2024 ๐Ÿ“Š, Deprecations for PHP 8.4 ๐Ÿ—ณ๏ธ, Stack Overflow Developer Survey Results ๐Ÿ“ˆ, Buggregator ๐Ÿ“ฆ

Gracefully handle failures in queued jobs. If a job fails after all attempts, you can execute custom code by defining a `failed()` method within your job class. Implement this method to manage tasks like cleaning up resources or notifying users when a job doesnโ€™t succeed.

28th of July, 2024

#15 - Laravel 11.16 released ๐Ÿš€, generate pattern-based strings with Faker ๐Ÿ’ก, How to test all get routes with a single Pest test ๐ŸŽฏ, The Problem with Coding Exercises in Technical Interviews ๐Ÿ’ป

The latest release brings several enhancements across the board. It introduces a new `success` console component and refines mail assertion capabilities, enabling streamlined tests for email dispatch to specific addresses. For SQLite users, new configuration options `busy_timeout`, `journal_mode`, and `synchronous` can boost performance significantly. Moreover, `ConnectionException` is now included in connection failure events.

21st of July, 2024

#14 - New without parentheses in PHP 8.4 ๐Ÿ†•, Using MySQL Views with Laravel ๐Ÿ—ƒ๏ธ, Making clearer announcements with `So What?` technique ๐Ÿ“ข, The #[\Override] attribute in PHP ๐Ÿ“

PHP 8.4 introduces a syntactic enhancement that allows developers to chain methods directly on newly created objects without wrapping them in parentheses, simplifying code and reducing friction in PHP coding.

14th of July, 2024

#13 - The Action Pattern deconstructed โš™๏ธ, PHP 8.4.0 Alpha 1 available for testing ๐Ÿš€ shadcn/ui components ๐Ÿ—ณ๏ธ Mocking is an Anti-Pattern ๐Ÿงช

Discover the benefits of using the action pattern in Laravel. This approach minimizes redundancy and promotes easier maintenance and testing, enhancing flexibility and integration in your applications. The article details how the action pattern structures your code for better scalability and testability.

7th of July, 2024

#12 - Adding PHPStan to a legacy project ๐Ÿงฉ, Laravel 11.12 & 11.13 released ๐Ÿš€, Http::pool() ๐Ÿ’ก, What Does 90th Percentile Mean ๐Ÿ“ˆ

This week, dive into the challenges and strategies of integrating PHPStan into legacy PHP projects. The article outlines practical approaches for adopting PHPStan to improve code quality incrementally. It focuses on setting up PHPStan, configuring it to recognize and handle legacy code specifics, and embedding it into continuous integration workflows to ensure ongoing code quality without overwhelming the development process.

30th of June, 2024

#11 - Pattern Matching Draft RFC ๐Ÿ“, Laravel 11.11 released ๐Ÿš€, Encrypted jobs ๐Ÿ’ก, How To Build a Productive Laravel Team ๐Ÿ› ๏ธ

Despite still being in draft, the new PHP RFC on Pattern Matching is creating quite a buzz due to its potential to streamline and enhance code readability significantly. This RFC proposes sophisticated matching techniques against complex data structures and the ability to extract values, which could drastically reduce code complexity. The excitement around this draft reflects its high quality and the substantial improvements it could bring to PHP, mirroring features already present in languages like Python and Rust.

23rd of June, 2024

#10 - Running PHP 1.0 in 2024 ๐Ÿ•ฐ๏ธ, Differences between Next.js and Laravel ๐Ÿ†š, Unlocking the Power of Attributes in PHP ๐Ÿ”“, collect.js ๐Ÿ“ฆ

Roman Pronsky takes us on a nostalgic journey back to 1995 with PHPโ€™s inaugural version in his latest YouTube video. Marvel at how PHP began as a simple toolkit called PHP Tools for personal webpage management and evolved into a cornerstone of web development. Pronsky expertly demonstrates PHP 1, providing insights into the languageโ€™s humble beginnings and its profound impact on todayโ€™s web technologies. This retrospective is a must-watch for anyone intrigued by the evolution of programming languages and the enduring legacy of PHP.

16th of June, 2024

#9 - Restore error sharing in Laravel ๐Ÿ”„, Accepted Deprecated attribute RFC โœ…, Laravel 11.10 released ๐Ÿš€, Adobe's terms update sparks outrage and clarification ๐Ÿ”ฅ

Spatie introduces the `spatie/laravel-error-share` package, restoring the โ€œShareโ€ button on Laravelโ€™s exception page. This enhancement brings back the ability to share error details easily, lost in the recent update to a more streamlined exception interface.

9th of June, 2024

#8 - Laravel New Default Exception Page ๐Ÿš€, Containerization Tips and Tricks for PHP app ๐Ÿณ, Cloudflare took down a website after trying to force them to pay 120k$ โ›ˆ๏ธ

Laravel v11.9.0 introduces a significant update with a new default exception page that now includes dark mode. This release also speeds up bootstrap times by utilizing a hashtable for provider storage, significantly benefiting large applications. Additionally, versions v11.9.1 and v11.9.2 have also been released, continuing the improvements and stability of the framework.

2nd of June, 2024

#7 - Laravel 11.8 released ๐Ÿš€, Laravel vs. React... ๐Ÿ†š, Dispatching jobs after response๐Ÿ’ก, Avoid the Long Parameter List โœ‚๏ธ

Explore recent updates to Laravel, including new features like the unshift method for Collections, the sibling of push(). Discover the new rule contains which checks if a request includes a specific value within an array, serving as the counterpart to the in rule.

26th of May, 2024

#6 - The Strategy Pattern ๐Ÿ”ง, array_find RFC ๐Ÿ—ณ๏ธ, S3 will no longer charge for unauthorized requests ๐Ÿ’ฐ, Stream files from S3 to clients in a memory-efficient way ๐ŸŒŠ

Explore how Laravel leverages the strategy pattern, allowing dynamic implementation swapping for diverse functionalities like caching. This article delves into practical applications and the underlying `CacheManager` implementation.

19th of May, 2024

#5 - Understanding Laravel Octane's โฉ, How to add custom domains to your App ๐Ÿ›ฃ๏ธ, Create an AI chat bot from scratch tutorial ๐Ÿค–, Laravel 11.7 released ๐Ÿš€

Explore how Laravel Octane accelerates request handling by pre-loading the application, akin to chefs preparing ingredients before rush hour. Anyone who has ever tried to implement custom domains for their apps knows it can be a daunting task ...

12th of May, 2024

#4 - How an empty S3 bucket can make your AWS bill explode ๐Ÿ’ธ, RFC: Release cycle update ๐Ÿ—ณ๏ธ, Whizzy launched ๐Ÿ†•, Laravel 11.6 Released ๐Ÿš€

Discover how Maciej Pocwierz received a $1,300 bill in just one day due to unauthorized requests. AWS charges for these, potentially exposing you to DDOS attacks on your financial accounts. Make sure to review your S3 buckets using Maciej's tips to safeguard against unexpected charges.

5th of May, 2024