TIL There's a built-in validation rule in Laravel to check if the user password has been leaked before. I love finding these little gems out of nowhere.
https://redd.it/1rr4s2e
@r_php
https://redd.it/1rr4s2e
@r_php
Reddit
From the laravel community on Reddit: TIL There's a built-in validation rule in Laravel to check if the user password has been…
Explore this post and more from the laravel community
Shop Performance in 30 Tagen
Der Praxisleitfaden für Shopware-Entwickler und Architekten
https://leanpub.com/shopware-performance
https://redd.it/1rrjf6f
@r_php
Der Praxisleitfaden für Shopware-Entwickler und Architekten
https://leanpub.com/shopware-performance
https://redd.it/1rrjf6f
@r_php
Leanpub
Shop Performance in 30 Tagen
Shopware 6 Performance-Optimierung in 30 Tagen. Praxisleitfaden mit 24 Kapiteln, 68 Diagnose-Scripts und GitHub-Repository. Core Web Vitals, Caching, Redis, Elasticsearch, Datenbank-Tuning. Von Mehmet Gökçe – 26 Jahre E-Commerce-Erfahrung. Für Entwickler…
µJS: add AJAX navigation to any PHP app with one script tag
https://mujs.org
https://redd.it/1rrl448
@r_php
https://mujs.org
https://redd.it/1rrl448
@r_php
µJS
µJS — Lightweight AJAX Navigation Library
Accelerate your website without a JS framework. Lightweight AJAX navigation library — 5KB gzipped, zero dependencies, drop-in compatible.
Swoole 6.2.0: added support for io_uring
https://github.com/swoole/swoole-src/releases/tag/v6.2.0
https://redd.it/1rrle0a
@r_php
https://github.com/swoole/swoole-src/releases/tag/v6.2.0
https://redd.it/1rrle0a
@r_php
GitHub
Release v6.2.0 · swoole/swoole-src
✨️ New Features
Added coroutine-based FTP client. By including the --enable-swoole-ftp option during compilation, coroutine support for FTP operations can be enabled, avoiding network blocking.
Ad...
Added coroutine-based FTP client. By including the --enable-swoole-ftp option during compilation, coroutine support for FTP operations can be enabled, avoiding network blocking.
Ad...
Moving from Laravel to Symfony after several years — how hard is it really?
Hi everyone,
I’ve been working almost exclusively with Laravel for several years. Recently I received a really good job offer, but the stack there is based on Symfony.
Over time I’ve moved away from relying heavily on Laravel’s “magic”. In most of my projects I use my own abstraction layers and architecture, and Laravel is mostly used as a boilerplate with routing, Eloquent ORM, and some framework utilities.
Because of that, I’m hoping the transition might not be too painful, but I’m still a bit unsure.
Has anyone here gone through a similar transition from Laravel to Symfony? How difficult was it in practice?
I’d also appreciate any advice on:
* What concepts in Symfony I should focus on first
* What parts usually feel the most unfamiliar for Laravel developers
* Anything that tends to be unexpectedly difficult during the switch
Thanks!
https://redd.it/1rrnqx0
@r_php
Hi everyone,
I’ve been working almost exclusively with Laravel for several years. Recently I received a really good job offer, but the stack there is based on Symfony.
Over time I’ve moved away from relying heavily on Laravel’s “magic”. In most of my projects I use my own abstraction layers and architecture, and Laravel is mostly used as a boilerplate with routing, Eloquent ORM, and some framework utilities.
Because of that, I’m hoping the transition might not be too painful, but I’m still a bit unsure.
Has anyone here gone through a similar transition from Laravel to Symfony? How difficult was it in practice?
I’d also appreciate any advice on:
* What concepts in Symfony I should focus on first
* What parts usually feel the most unfamiliar for Laravel developers
* Anything that tends to be unexpectedly difficult during the switch
Thanks!
https://redd.it/1rrnqx0
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
How the invade package works under the hood to access private methods/properties
https://freek.dev/3048-how-to-easily-access-private-properties-and-methods-in-php
https://redd.it/1rrndte
@r_php
https://freek.dev/3048-how-to-easily-access-private-properties-and-methods-in-php
https://redd.it/1rrndte
@r_php
freek.dev
How to easily access private properties and methods in PHP | freek.dev
Sometimes you need to access a private property or method on an object that isn't yours. Maybe you're writing a test and need to assert some internal state. Maybe you're building a package that needs to reach into another object's internals. Whatever the…
Laravel Site Search v3 is here: crawl and search your entire site using just your database
https://freek.dev/3040-laravel-site-search-v3-is-here-crawl-and-search-your-entire-site-using-just-your-database
https://redd.it/1rrq7z0
@r_php
https://freek.dev/3040-laravel-site-search-v3-is-here-crawl-and-search-your-entire-site-using-just-your-database
https://redd.it/1rrq7z0
@r_php
freek.dev
Laravel Site Search v3 is here: crawl and search your entire site using just your database | freek.dev
We're proud to release v3 of laravel-site-search, a package that crawls and indexes your entire site. Think of it as your own private Google. Point it at a URL, let it crawl every page, and get full-text search results back.
Previous versions required Meilisearch…
Previous versions required Meilisearch…
How to easily access private properties and methods in PHP using invader
https://freek.dev/3048-how-to-easily-access-private-properties-and-methods-in-php
https://redd.it/1rrne9p
@r_php
https://freek.dev/3048-how-to-easily-access-private-properties-and-methods-in-php
https://redd.it/1rrne9p
@r_php
freek.dev
How to easily access private properties and methods in PHP | freek.dev
Sometimes you need to access a private property or method on an object that isn't yours. Maybe you're writing a test and need to assert some internal state. Maybe you're building a package that needs to reach into another object's internals. Whatever the…
A server side analytics tool for Laravel
https://simplestats.io/blog/server-side-analytics-laravel
https://redd.it/1rrrhmc
@r_php
https://simplestats.io/blog/server-side-analytics-laravel
https://redd.it/1rrrhmc
@r_php
simplestats.io
SimpleStats - The missing analytics tool for Laravel applications
A server-side, GDPR compliant and 100% accurate analytics tool, that goes beyond simple counts of views and visits. Discover in-depth metrics like Registrations, Daily Active Users, Average Revenue Per User, campaign ROI and much more!
99.9% type coverage, PHPStan strict, zero N+1 — building a production CRM in PHP 8.4
Hey r/php, I just shipped v3.0 of an open-source CRM I've been building (Relaticle). Wanted to share some PHP-specific engineering decisions, since this community appreciates that kind of thing.
PHP 8.4 strict mode in production: Every class is final. Every file uses strict_types. Typed properties and return types everywhere:
declare(stricttypes=1);
final class People extends Model implements HasCustomFields
{
/** @use HasFactory<PeopleFactory> */
use HasFactory;
use HasUlids;
use SoftDeletes;
use UsesCustomFields;
/** @var list<string> */
protected $fillable = ['name', 'creationsource'];
/ @return BelongsTo<Company, $this> /
public function company(): BelongsTo
{
return $this->belongsTo(Company::class);
}
}
Spatie's laravel-data for typed DTOs:
final class SubscriberData extends Data
{
public function __construct(
public string $email,
public ?string $first_name = '',
public ?string $last_name = '',
# PHP 8.4 with strict_types everywhere is genuinely a joy to write. The language has come so far.
99.9% type coverage: I run PHPStan at level 7 (via Larastan). Every method signature is typed. Every return type is explicit. CI fails on any violation — no exceptions, no baselines.
/ @param Collection<int, Contact> $contacts /
public function processImport(Collection $contacts): ImportResult
{
}
# Is it overkill? Maybe. But in a CRM where data integrity matters (contacts, deals, money), catching type mismatches at static analysis time is cheaper than catching them in production.
N+1 query prevention: One line in AppServiceProvider:
Model::preventLazyLoading(!app()->isProduction());
# Strict lazy loading enabled globally. Forget an eager load? Exception in development. This alone caught 10-20 performance issues before they shipped.
PostgreSQL over MySQL: Migrated from MySQL to PostgreSQL 17+ in v3.0. Key reason: JSONB. I built no-code custom fields — users create fields without touching code. All stored as JSONB with GIN indexes:
-- PostgreSQL JSONB with proper indexing
CREATE INDEX idxcustomfields ON contacts USING GIN (customfields);
-- Partial path queries that MySQL JSON can't do efficiently
SELECT * FROM contacts WHERE customfields->>'industry' = 'SaaS';
# MySQL's JSON type can't do proper indexing or partial path queries at this level. For a CRM with dynamic schemas, PostgreSQL is the better fit.
Testing with Pest: Comprehensive test suite — unit, feature, and browser tests. Pest's syntax makes test writing feel less like a chore:
arch('strict types')
->expect('App')
->toUseStrictTypes();
arch('avoid open for extension')
->expect('App')
->classes()
->toBeFinal();
});
# Architecture tests prevent structural issues at CI time. If someone accidentally breaks a convention, CI catches it.
Import wizard (the hardest problem): Real-world CSVs are chaos:
Automatic date format detection (uses Laravel's date validator under the hood)
Fuzzy + exact column matching
Relationship mapping (person → company linkage)
Chunked processing for large files
Granular error reporting (which rows failed, why) If anyone's solving CSV import in PHP, happy to discuss approaches.
Stack:
PHP 8.4 + Laravel 12
PostgreSQL 17+ + Redis
Filament 5 + Livewire 4
Docker + docker-compose Links:
GitHub: https://github.com/Relaticle/relaticle (1.2K stars)
Free hosted: [https://relaticle.com](https://relaticle.com) (no credit card)
License: AGPL-3.0. For internal use — no restrictions.
What PHP 8.4 features have you found most useful in production? Curious what patterns this community is adopting
https://redd.it/1rru8yy
@r_php
Hey r/php, I just shipped v3.0 of an open-source CRM I've been building (Relaticle). Wanted to share some PHP-specific engineering decisions, since this community appreciates that kind of thing.
PHP 8.4 strict mode in production: Every class is final. Every file uses strict_types. Typed properties and return types everywhere:
declare(stricttypes=1);
final class People extends Model implements HasCustomFields
{
/** @use HasFactory<PeopleFactory> */
use HasFactory;
use HasUlids;
use SoftDeletes;
use UsesCustomFields;
/** @var list<string> */
protected $fillable = ['name', 'creationsource'];
/ @return BelongsTo<Company, $this> /
public function company(): BelongsTo
{
return $this->belongsTo(Company::class);
}
}
Spatie's laravel-data for typed DTOs:
final class SubscriberData extends Data
{
public function __construct(
public string $email,
public ?string $first_name = '',
public ?string $last_name = '',
# PHP 8.4 with strict_types everywhere is genuinely a joy to write. The language has come so far.
99.9% type coverage: I run PHPStan at level 7 (via Larastan). Every method signature is typed. Every return type is explicit. CI fails on any violation — no exceptions, no baselines.
/ @param Collection<int, Contact> $contacts /
public function processImport(Collection $contacts): ImportResult
{
}
# Is it overkill? Maybe. But in a CRM where data integrity matters (contacts, deals, money), catching type mismatches at static analysis time is cheaper than catching them in production.
N+1 query prevention: One line in AppServiceProvider:
Model::preventLazyLoading(!app()->isProduction());
# Strict lazy loading enabled globally. Forget an eager load? Exception in development. This alone caught 10-20 performance issues before they shipped.
PostgreSQL over MySQL: Migrated from MySQL to PostgreSQL 17+ in v3.0. Key reason: JSONB. I built no-code custom fields — users create fields without touching code. All stored as JSONB with GIN indexes:
-- PostgreSQL JSONB with proper indexing
CREATE INDEX idxcustomfields ON contacts USING GIN (customfields);
-- Partial path queries that MySQL JSON can't do efficiently
SELECT * FROM contacts WHERE customfields->>'industry' = 'SaaS';
# MySQL's JSON type can't do proper indexing or partial path queries at this level. For a CRM with dynamic schemas, PostgreSQL is the better fit.
Testing with Pest: Comprehensive test suite — unit, feature, and browser tests. Pest's syntax makes test writing feel less like a chore:
arch('strict types')
->expect('App')
->toUseStrictTypes();
arch('avoid open for extension')
->expect('App')
->classes()
->toBeFinal();
});
# Architecture tests prevent structural issues at CI time. If someone accidentally breaks a convention, CI catches it.
Import wizard (the hardest problem): Real-world CSVs are chaos:
Automatic date format detection (uses Laravel's date validator under the hood)
Fuzzy + exact column matching
Relationship mapping (person → company linkage)
Chunked processing for large files
Granular error reporting (which rows failed, why) If anyone's solving CSV import in PHP, happy to discuss approaches.
Stack:
PHP 8.4 + Laravel 12
PostgreSQL 17+ + Redis
Filament 5 + Livewire 4
Docker + docker-compose Links:
GitHub: https://github.com/Relaticle/relaticle (1.2K stars)
Free hosted: [https://relaticle.com](https://relaticle.com) (no credit card)
License: AGPL-3.0. For internal use — no restrictions.
What PHP 8.4 features have you found most useful in production? Curious what patterns this community is adopting
https://redd.it/1rru8yy
@r_php
GitHub
GitHub - relaticle/relaticle: The Next-Generation Open-Source CRM Platform written with Laravel and Filament
The Next-Generation Open-Source CRM Platform written with Laravel and Filament - relaticle/relaticle
Appel à settings/password depuis mon front SPA Nuxt
Hello,
mon front SPA Nuxt fait un appel PUT à l'endpoint de Laravel Fortify /settings/password lorsque le user connecté veut modifier son mot de passe depuis son dashboard. Le mot de passe est bien enregistré mais la réponse est une redirection alors que je veux que ce soit une réponse JSON avec un message de succès ou d'erreur.
Comment faire ?
Merci
Voici mes bouts de code:
Fonction appelée par le formulaire:
const resetPassword = async () => {
loading.value = true
try {
const data = await api('/settings/password', {
method: 'PUT',
body: {
currentpassword: currentPassword.value,
password: password.value,
passwordconfirmation: passwordConfirmation.value,
}
})
status.value = 'success'
message.value = 'Mot de passe modifié avec succès'
currentPassword.value = ''
password.value = ''
passwordConfirmation.value = ''
} catch (err: any) {
console.log(err);
status.value = 'error'
message.value = err.data?.message || 'Une erreur est survenue'
} finally {
loading.value = false
}
}
Le composable useApiFetch:
export function useApiRequest() {
const config =
useRuntimeConfig
()
const xsrfToken =
useCookie
('XSRF-TOKEN')
return
$fetch
.create({
baseURL: config.public.apiBase,
credentials: 'include',
headers: {
'Accept': 'application/json',
'X-XSRF-TOKEN': xsrfToken.value || '',
},
})
}
La Response de l'appel à l'endpoint contient un Header Location qui entraîne la tentative de redirection.
https://redd.it/1rrxwgz
@r_php
Hello,
mon front SPA Nuxt fait un appel PUT à l'endpoint de Laravel Fortify /settings/password lorsque le user connecté veut modifier son mot de passe depuis son dashboard. Le mot de passe est bien enregistré mais la réponse est une redirection alors que je veux que ce soit une réponse JSON avec un message de succès ou d'erreur.
Comment faire ?
Merci
Voici mes bouts de code:
Fonction appelée par le formulaire:
const resetPassword = async () => {
loading.value = true
try {
const data = await api('/settings/password', {
method: 'PUT',
body: {
currentpassword: currentPassword.value,
password: password.value,
passwordconfirmation: passwordConfirmation.value,
}
})
status.value = 'success'
message.value = 'Mot de passe modifié avec succès'
currentPassword.value = ''
password.value = ''
passwordConfirmation.value = ''
} catch (err: any) {
console.log(err);
status.value = 'error'
message.value = err.data?.message || 'Une erreur est survenue'
} finally {
loading.value = false
}
}
Le composable useApiFetch:
export function useApiRequest() {
const config =
useRuntimeConfig
()
const xsrfToken =
useCookie
('XSRF-TOKEN')
return
$fetch
.create({
baseURL: config.public.apiBase,
credentials: 'include',
headers: {
'Accept': 'application/json',
'X-XSRF-TOKEN': xsrfToken.value || '',
},
})
}
La Response de l'appel à l'endpoint contient un Header Location qui entraîne la tentative de redirection.
https://redd.it/1rrxwgz
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Livestream: Road to Laracon with Aaron Francis and Zuzana Kunckova
I often see people asking about getting started with conference speaking and eventually speaking at larger conferences like a Laracon, so I figured it was time to actually dig into it.
Tomorrow (3/12) at 12pm EDT (4pm UTC), I'm going live with Aaron Francis and Zuzana Kunckova to talk about the road to conference speaking. We'll be covering where talk ideas come from, CFP submissions, what goes into preparing a talk, and working your way up from meetups to a Laracon. Aaron and Zuzana will also be sharing their own paths to the Laracon stage.
Would love to see you there! Drop any questions here ahead of time or ask in chat during the stream.
Stream link: https://www.youtube.com/watch?v=FuQjSPBIHlo
https://redd.it/1rr61vr
@r_php
I often see people asking about getting started with conference speaking and eventually speaking at larger conferences like a Laracon, so I figured it was time to actually dig into it.
Tomorrow (3/12) at 12pm EDT (4pm UTC), I'm going live with Aaron Francis and Zuzana Kunckova to talk about the road to conference speaking. We'll be covering where talk ideas come from, CFP submissions, what goes into preparing a talk, and working your way up from meetups to a Laracon. Aaron and Zuzana will also be sharing their own paths to the Laracon stage.
Would love to see you there! Drop any questions here ahead of time or ask in chat during the stream.
Stream link: https://www.youtube.com/watch?v=FuQjSPBIHlo
https://redd.it/1rr61vr
@r_php
YouTube
Road to Speaking at Laracon w/ Aaron and Zuzana
What does it take to go from wanting to speak at conferences to standing on the Laracon stage?
Aaron Francis and Zuzana Kunckova join the stream to talk about their paths to conference speaking. We’ll discuss where talk ideas come from, how to write a CFP…
Aaron Francis and Zuzana Kunckova join the stream to talk about their paths to conference speaking. We’ll discuss where talk ideas come from, how to write a CFP…
Why Array String Keys Are Not Type-Safe in PHP And What Will PHPStan Do About It
https://phpstan.org/blog/why-array-string-keys-are-not-type-safe
https://redd.it/1rxze5d
@r_php
https://phpstan.org/blog/why-array-string-keys-are-not-type-safe
https://redd.it/1rxze5d
@r_php
phpstan.org
Why Array String Keys Are Not Type-Safe in PHP
AuditTrailBundle: symfony profiler support
AuditTrailBundle now includes a Symfony Web Profiler integration, allowing developers to inspect audit logs recorded during a request directly from the debug toolbar and profiler panel.
The integration is fully optional — the collector is only registered when WebProfilerBundle is present, so there is zero overhead for applications that don't use it.
Looking for early community feedback: is this a useful addition, or does the Doctrine profiler panel already cover your needs? Would love to hear from anyone who has worked with audit logging in Symfony before shipping this.
https://preview.redd.it/sxtoxhwxb1qg1.png?width=1221&format=png&auto=webp&s=f6892f51bfecd5d9a7d1a58ad8824aca7e81f2bc
https://redd.it/1ry6lgw
@r_php
AuditTrailBundle now includes a Symfony Web Profiler integration, allowing developers to inspect audit logs recorded during a request directly from the debug toolbar and profiler panel.
The integration is fully optional — the collector is only registered when WebProfilerBundle is present, so there is zero overhead for applications that don't use it.
Looking for early community feedback: is this a useful addition, or does the Doctrine profiler panel already cover your needs? Would love to hear from anyone who has worked with audit logging in Symfony before shipping this.
https://preview.redd.it/sxtoxhwxb1qg1.png?width=1221&format=png&auto=webp&s=f6892f51bfecd5d9a7d1a58ad8824aca7e81f2bc
https://redd.it/1ry6lgw
@r_php
GitHub
GitHub - rcsofttech85/AuditTrailBundle: High-performance Symfony audit logging for Doctrine ORM. Async-ready, cryptographically…
High-performance Symfony audit logging for Doctrine ORM. Async-ready, cryptographically signed, and optimized for enterprise compliance without the database overhead. - rcsofttech85/AuditTrailBundle
How far can $5 of free trial credit last on Laravel Cloud?
https://youtu.be/kcvi5Tzd6Ms
https://redd.it/1rydsbo
@r_php
https://youtu.be/kcvi5Tzd6Ms
https://redd.it/1rydsbo
@r_php
YouTube
How long does $5 last on Laravel Cloud?
Now that Laravel Cloud has $5 of free credit for all new accounts. Is that even enough to host a real application? Isn't that just 5 minutes of uptime?
Well.. not really. That $5 can last you for quite some time depending on your application. Let's talk…
Well.. not really. That $5 can last you for quite some time depending on your application. Let's talk…
Typewriter - GraphQL code generation tool for PHP
https://github.com/plmrlnsnts/typewriter
https://redd.it/1ryr3pp
@r_php
https://github.com/plmrlnsnts/typewriter
https://redd.it/1ryr3pp
@r_php
GitHub
GitHub - plmrlnsnts/typewriter: Typewriter is a GraphQL code generation tool to easily generate PHP classes and enums from your…
Typewriter is a GraphQL code generation tool to easily generate PHP classes and enums from your GraphQL schema and GraphQL operations. - plmrlnsnts/typewriter
PSL 6.1: HTTP/2, HPACK, Compression, and Cache
https://github.com/php-standard-library/php-standard-library/releases/tag/6.1.0
https://redd.it/1ry6m7y
@r_php
https://github.com/php-standard-library/php-standard-library/releases/tag/6.1.0
https://redd.it/1ry6m7y
@r_php
GitHub
Release Hevlaska 6.1.0 · php-standard-library/php-standard-library
PSL 6.1.0
In PSL 5.x, we focused on the foundational networking stack-TCP, TLS, Unix sockets, UDP, and connection pooling. It was all about getting the low-level plumbing right.
With the 6.x series...
In PSL 5.x, we focused on the foundational networking stack-TCP, TLS, Unix sockets, UDP, and connection pooling. It was all about getting the low-level plumbing right.
With the 6.x series...
Best AI Models with Laravel
https://laravel.com/blog/which-ai-model-is-best-for-laravel
https://redd.it/1ry40v1
@r_php
https://laravel.com/blog/which-ai-model-is-best-for-laravel
https://redd.it/1ry40v1
@r_php
Laravel
Which AI Model Is Best for Laravel? | Laravel - The clean stack for Artisans and agents
We benchmarked 6 AI models on 17 real Laravel tasks, with and without Laravel Boost. See which model wins, which fails, and by how much.
Laravel Nestedset: Effective tree structures for SQL databases
Version 7.1 of the aimeos/laravel-nestedset package for managing trees using nested sets is now available. It's an improved version of the popular kalnoy/nestedset package which, unfortunately, has been virtually abandoned by its owner.
Repo: [https://github.com/aimeos/laravel-nestedset](https://github.com/aimeos/laravel-nestedset)
The 7.1 release contains:
Support for Laravel 13
Implemented siblings relation
Delete descendants correctly
Fixed infinite recursion with serialization
Tests for all supported databases
To dig deeper into the package, please check:
https://laravel-nestedset.org
If you like our package, leave a star :-)
https://redd.it/1ryubp5
@r_php
Version 7.1 of the aimeos/laravel-nestedset package for managing trees using nested sets is now available. It's an improved version of the popular kalnoy/nestedset package which, unfortunately, has been virtually abandoned by its owner.
Repo: [https://github.com/aimeos/laravel-nestedset](https://github.com/aimeos/laravel-nestedset)
The 7.1 release contains:
Support for Laravel 13
Implemented siblings relation
Delete descendants correctly
Fixed infinite recursion with serialization
Tests for all supported databases
To dig deeper into the package, please check:
https://laravel-nestedset.org
If you like our package, leave a star :-)
https://redd.it/1ryubp5
@r_php
packagist.org
The PHP Package Repository