Newslurp

<< Stories

#65 - Welcome the New Stream Hooks for React & Vue 🎥, Laravel N8N 📦, Agent2Agent Protocol, clearly explained with code example 🤖, The pipe operator in PHP 8.5 🔗

The Laralist <hello@thelaralist.com>

July 6, 10:25 am

#65 - Welcome the New Stream Hooks for React & Vue 🎥, Laravel N8N 📦, Agent2Agent Protocol, clearly explained with code example 🤖, The pipe operator in PHP 8.5 🔗
A fluent Laravel client for the n8n REST API and webhooks. Manage workflows, executions, credentials, users, and more from your Laravel app, bringing powerful n8n automation into your PHP projects.
The Laralist
#65 - 6th of July, 2025
🧱
Laravel

If your project relies on third-party models, consider building your own Laravel factory for them. Even without direct control over these models, having a custom factory lets you quickly generate consistent test data, streamlining local development and automated testing.

Laravel’s prefers method helps you determine which response format a client expects by inspecting the Accept header. This allows controllers to return data as JSON, HTML, CSV, or other formats from the same endpoint, making it easier to support multiple content types with minimal logic.

This video showcases new useStream hooks for React and Vue, letting you easily display streamed responses—ideal for AI, live updates, or code translation features. The hooks provide real-time data to your UI with simple, minimal code, and work seamlessly with Laravel backends.

💡
Tip of the Week

You can stop Laravel from reporting certain exceptions by having your custom exception class implement the ShouldntReport interface, instead of just adding it to the $dontReport array. This approach keeps the behavior self-contained and clear within the exception itself.

<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Contracts\Debug\ShouldntReport;

class PodcastProcessingException extends Exception implements ShouldntReport
{
    //
}
🐘
PHP

Learn how named parameters in PHPUnit factories let you specify only the values you care about, making test setup more readable and maintainable. A small change, big boost for PHP test clarity.

The #[\NoDiscard] attribute in PHP 8.5 ensures return values from functions are used, reducing bugs from ignored results. It emits warnings if return values aren't consumed, enhancing code reliability.

PHP 8.5 introduces the pipe operator, streamlining code by chaining operations without temporary variables. It offers a cleaner, more readable alternative to deeply nested function calls, enhancing code maintainability.

📦
Package of the Week

A fluent Laravel client for the n8n REST API and webhooks. Manage workflows, executions, credentials, users, and more from your Laravel app, bringing powerful n8n automation into your PHP projects.

Misc

A practical walkthrough of using Claude Code to automate website SEO checks: supply URLs and audit prompts, and Claude generates analysis and actionable recommendations, speeding up the audit process.

This X thread walks through Google’s Agent2Agent (A2A) protocol, contrasting it with MCP and illustrating how agents collaborate by exchanging context, updates, and data. The author builds and runs three sample agents locally, demonstrating agent-to-agent communication with clear code examples.

We value your thoughts and feedback. Feel free to hit reply and share your ideas with us.
If you find our content helpful, please consider forwarding it or sharing it with your friends and colleagues.
Thank you for reading,
Mario & Javi
If you prefer not to receive future editions of The Laralist, please unsubscribe.