Building a model reservation system with atomic locks
https://youtu.be/czHUFCWVY0c
https://redd.it/1kd3i14
@r_php
https://youtu.be/czHUFCWVY0c
https://redd.it/1kd3i14
@r_php
YouTube
Building a model reservation system with atomic locks
We're using Laravel's atomic locks and database-generated columns to build a reliable reservation system—without race conditions or extra tables. I'll show you how to hook into Laravel’s cache lock system, add polymorphic relationships, and use generated…
How to show uploaded image preview on EasyAdmin "new" entity page?
Hi everyone,
I'm working on a small side project and decided to use EasyAdmin as the admin panel. Overall, it's been great and covers most of my needs. However, I've run into one issue I can't figure out.
I have an entity that includes an image. I'd like the image to be displayed:
1. On the "edit" page — showing the currently saved image.
2. On the "new" page — as soon as a file is selected (before saving the entity).
I managed to override the
But I can't figure out how to make the image preview appear when creating a new entity — right after selecting a file. Has anyone dealt with this or could point me in the right direction?
Thanks in advance!
https://redd.it/1kcwos4
@r_php
Hi everyone,
I'm working on a small side project and decided to use EasyAdmin as the admin panel. Overall, it's been great and covers most of my needs. However, I've run into one issue I can't figure out.
I have an entity that includes an image. I'd like the image to be displayed:
1. On the "edit" page — showing the currently saved image.
2. On the "new" page — as soon as a file is selected (before saving the entity).
I managed to override the
ea_fileupload_widget and added an <img> tag to preview the image, which works fine on the "edit" page.But I can't figure out how to make the image preview appear when creating a new entity — right after selecting a file. Has anyone dealt with this or could point me in the right direction?
Thanks in advance!
https://redd.it/1kcwos4
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Nightwatch open source alternative ?
Hi
I'm managing more than a dozen laravel apps, on a few servers.
I've heard of nightwatch recently, and found interresting to be able to monitor all my apps in one central place.
But, in my company, we have a very strict policy about data that should not get out.
I'm dreaming of building something like nightwatch, but perhaps a bit more lightweight.
Perhaps something collecting Laravel Pulse data, centralizing it on a main dashboard, that could be queried at whole, the server level, or app by app...
Anyone might be interested joining this journey ? wants to share their needs ? or even collaborate on this open source project ?
https://redd.it/1kd9bbl
@r_php
Hi
I'm managing more than a dozen laravel apps, on a few servers.
I've heard of nightwatch recently, and found interresting to be able to monitor all my apps in one central place.
But, in my company, we have a very strict policy about data that should not get out.
I'm dreaming of building something like nightwatch, but perhaps a bit more lightweight.
Perhaps something collecting Laravel Pulse data, centralizing it on a main dashboard, that could be queried at whole, the server level, or app by app...
Anyone might be interested joining this journey ? wants to share their needs ? or even collaborate on this open source project ?
https://redd.it/1kd9bbl
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Privacy Driven Development: How Not to Do It
https://dailyrefactor.com/privacy-driven-development-how-not-to-do-it
https://redd.it/1kddqcg
@r_php
https://dailyrefactor.com/privacy-driven-development-how-not-to-do-it
https://redd.it/1kddqcg
@r_php
i made a weird terminal emulator in php with a plugin system
hey, just sharing this weird little project I made in a day, its a terminal emulator written in php with a very pacman inspired plugin manager cuz why not. it even has paranoid mode for running stuff in a bubblewrap sandbox.
termongel
feedback, roast, pr whatever welcome!
https://redd.it/1kdasgy
@r_php
hey, just sharing this weird little project I made in a day, its a terminal emulator written in php with a very pacman inspired plugin manager cuz why not. it even has paranoid mode for running stuff in a bubblewrap sandbox.
termongel
feedback, roast, pr whatever welcome!
https://redd.it/1kdasgy
@r_php
GitHub
GitHub - termongel/termongel: unconvential php based terminal emulator for linux
unconvential php based terminal emulator for linux - termongel/termongel
Browsing Past Editions of The Laralist is now Available
Hey everyone,
I just wanted to let you know that we've added a newsletter archive to The Laralist.
Now, you can easily browse through past editions and catch up on curated Laravel, PHP, package news, tips, and interesting reads you might have missed.
I hope you find it useful!
You can see it here: https://thelaralist.com/archives
https://redd.it/1kdpoua
@r_php
Hey everyone,
I just wanted to let you know that we've added a newsletter archive to The Laralist.
Now, you can easily browse through past editions and catch up on curated Laravel, PHP, package news, tips, and interesting reads you might have missed.
I hope you find it useful!
You can see it here: https://thelaralist.com/archives
https://redd.it/1kdpoua
@r_php
Substack
Archive - The Laralist
Full archive of all the posts from The Laralist.
What is the best authentication method, in PHP?
I’m currently developing a side project that I intend to publish later. It’s a Vue-based frontend application interfacing with a PHP backend via a REST API. I’m looking to implement a secure and reliable authentication method. What would be the most effective and safest approach to handle authentication in this architecture?
https://redd.it/1kdr3cq
@r_php
I’m currently developing a side project that I intend to publish later. It’s a Vue-based frontend application interfacing with a PHP backend via a REST API. I’m looking to implement a secure and reliable authentication method. What would be the most effective and safest approach to handle authentication in this architecture?
https://redd.it/1kdr3cq
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Looking for a good logging solution
Hi,
I'm running a hobby project with Symfony-Docker (frankenphp) and want to get an overview of my logs. So i need some kind of dashboard where I can search and filter my logs. I read about elk https://symfony.com/doc/current/logging/handlers.html but it says it's not a good fit for production because it sends the logs during request-response. So I was wondering if there is some solution that can just read the logfile and send it to elk or do you use any other tool for logging?
https://redd.it/1kdsiaa
@r_php
Hi,
I'm running a hobby project with Symfony-Docker (frankenphp) and want to get an overview of my logs. So i need some kind of dashboard where I can search and filter my logs. I read about elk https://symfony.com/doc/current/logging/handlers.html but it says it's not a good fit for production because it sends the logs during request-response. So I was wondering if there is some solution that can just read the logfile and send it to elk or do you use any other tool for logging?
https://redd.it/1kdsiaa
@r_php
Symfony
Handlers (Symfony Docs)
ElasticsearchLogstashHandler This handler deals directly with the HTTP interface of Elasticsearch. This means it will slow down your application if Elasticsearch takes time to answer. Even if all HTTP…
Are enums just extremely cool or I am doing use them to often.
When I first learned about enums, I wasn't sure what to use them for. But now, I use them quite often—primarily to store values in the database or to create config enums that also provide labels through a label function.
How do you use enums to make your code cleaner?
https://redd.it/1kdw6da
@r_php
When I first learned about enums, I wasn't sure what to use them for. But now, I use them quite often—primarily to store values in the database or to create config enums that also provide labels through a label function.
How do you use enums to make your code cleaner?
https://redd.it/1kdw6da
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Is this somebody overusing AI?
I was reading a PR recently and saw this code:
This does the same thing (edit: in my app, which takes values or Closures) as
Am I off base here?
https://redd.it/1kdx7xk
@r_php
I was reading a PR recently and saw this code:
->color(Closure::fromCallable([$this, “getStateColor”]))This does the same thing (edit: in my app, which takes values or Closures) as
->color($this->getStateColor()). Except, at least to me, I have no idea why any human would write it the former way unless they were heavily using AI without thinking (this guy’s code regularly breaks, but previously this could be ascribed to a lack of skill or attention to detail).Am I off base here?
https://redd.it/1kdx7xk
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Why did the old CGI style of structuring sites die?
Most websites can have their routes be modeled by the filesystem (folders, static files, dynamic .php files). Nowadays the trend is to have files that are fully code (and not necessarily in a location that matches the route it defines) with template files that have some tag defined to paste string there. To me the new way feels way less natural and approachable, so why is it almost universally recommended over the old way?
https://redd.it/1kec7np
@r_php
Most websites can have their routes be modeled by the filesystem (folders, static files, dynamic .php files). Nowadays the trend is to have files that are fully code (and not necessarily in a location that matches the route it defines) with template files that have some tag defined to paste string there. To me the new way feels way less natural and approachable, so why is it almost universally recommended over the old way?
https://redd.it/1kec7np
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
A Week of Symfony #957 (April 28 – May 4, 2025)
https://symfony.com/blog/a-week-of-symfony-957-april-28-may-4-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1keelro
@r_php
https://symfony.com/blog/a-week-of-symfony-957-april-28-may-4-2025?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1keelro
@r_php
Symfony
A Week of Symfony #957 (April 28 – May 4, 2025) (Symfony Blog)
This week, Symfony 6.4.21 and 7.2.6 maintenance versions were released. In addition, we published the first beta of Symfony 7.3 so you can test it in your own apps before its final release at the end …
Package : Symfony-ai-context-bundle
Hello developers,
I've just published a new open source Symfony bundle that automatically generates an AI-readable JSON context from your project.
It extracts information from your Doctrine entities, services, controllers, routes, and repositories, and outputs a structured JSON file that can be fed directly into tools like ChatGPT or any other LLM — for example to help with code generation, analysis, automation, or fine-tuned configuration.
Package: https://packagist.org/packages/ai-context/symfony-ai-context-bundle
Command: `php bin/console ai-context:generate`
I'm looking for early feedback: bugs, edge cases, suggestions, criticisms — anything that could help improve the tool before a broader release.
Some work is still planned, especially around excluding specific classes.
Thanks in advance to anyone willing to give it a try.
https://redd.it/1keg0bf
@r_php
Hello developers,
I've just published a new open source Symfony bundle that automatically generates an AI-readable JSON context from your project.
It extracts information from your Doctrine entities, services, controllers, routes, and repositories, and outputs a structured JSON file that can be fed directly into tools like ChatGPT or any other LLM — for example to help with code generation, analysis, automation, or fine-tuned configuration.
Package: https://packagist.org/packages/ai-context/symfony-ai-context-bundle
Command: `php bin/console ai-context:generate`
I'm looking for early feedback: bugs, edge cases, suggestions, criticisms — anything that could help improve the tool before a broader release.
Some work is still planned, especially around excluding specific classes.
Thanks in advance to anyone willing to give it a try.
https://redd.it/1keg0bf
@r_php
packagist.org
ai-context/symfony-ai-context-bundle - Packagist
Symfony bundle to generate AI-readable project context.
Do you use uuids with doctrine and symfony?
I tried to use UUIDs, but there were so many problems that it wasn't worth it for me. I tried using UUIDv7, but there were problems generating fixtures—for some reason, I got duplicated UUIDs when creating 1000 entities with fixtures. Probably the UUIDs got generated too fast, but how to fix this? I don't want to add a sleep or something like that.
Also, the dev toolbar Doctrine query section doesn't show the UUIDs—instead, it shows the hex code, I think. PhpMyAdmin also doesn't work well with UUIDs. And I think there were some more problems I don't remember anymore.
https://redd.it/1keluec
@r_php
I tried to use UUIDs, but there were so many problems that it wasn't worth it for me. I tried using UUIDv7, but there were problems generating fixtures—for some reason, I got duplicated UUIDs when creating 1000 entities with fixtures. Probably the UUIDs got generated too fast, but how to fix this? I don't want to add a sleep or something like that.
Also, the dev toolbar Doctrine query section doesn't show the UUIDs—instead, it shows the hex code, I think. PhpMyAdmin also doesn't work well with UUIDs. And I think there were some more problems I don't remember anymore.
https://redd.it/1keluec
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Weekly /r/Laravel Help Thread
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1keoni9
@r_php
Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:
What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.
For more immediate support, you can ask in the official Laravel Discord.
Thanks and welcome to the r/Laravel community!
https://redd.it/1keoni9
@r_php
Laravel
Installation - Laravel 12.x - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Laravel Reverb & App communication. Who’s calling who?
I’m running three separate containers in AWS Fargate:
* App (Laravel API/Backend)
* Reverb (WebSocket server)
* Horizon (queue worker)
In my AWS WAF logs, I’m seeing a recurring HTTPS request to /apps/12345/connections approximately every 15 seconds. The request originates from my own NAT Gateway, so it’s definitely internal traffic from one of these containers.
I’m trying to figure out which service is making these calls.
Is the Laravel app sending HTTP requests to Reverb?
Or is Reverb making HTTP requests back to the Laravel API (for example to fetch presence info or statistics)?
Could this be triggered by something like Laravel Pulse, or is this behavior built into the Reverb server itself?
I’m mainly trying to optimize internal traffic routing and avoid unnecessary public ALB and WAF processing for internal service calls. Any insight into what triggers these /connections requests and which service initiates them would be really helpful.
https://redd.it/1kes9bm
@r_php
I’m running three separate containers in AWS Fargate:
* App (Laravel API/Backend)
* Reverb (WebSocket server)
* Horizon (queue worker)
In my AWS WAF logs, I’m seeing a recurring HTTPS request to /apps/12345/connections approximately every 15 seconds. The request originates from my own NAT Gateway, so it’s definitely internal traffic from one of these containers.
I’m trying to figure out which service is making these calls.
Is the Laravel app sending HTTP requests to Reverb?
Or is Reverb making HTTP requests back to the Laravel API (for example to fetch presence info or statistics)?
Could this be triggered by something like Laravel Pulse, or is this behavior built into the Reverb server itself?
I’m mainly trying to optimize internal traffic routing and avoid unnecessary public ALB and WAF processing for internal service calls. Any insight into what triggers these /connections requests and which service initiates them would be really helpful.
https://redd.it/1kes9bm
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Weekly Ask Anything Thread
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1kf1u95
@r_php
Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.
https://redd.it/1kf1u95
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Weekly help thread
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1kf4i3p
@r_php
Hey there!
This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!
https://redd.it/1kf4i3p
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
New in Symfony 7.3: Simpler Server Event Streaming
https://symfony.com/blog/new-in-symfony-7-3-simpler-server-event-streaming?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kf65kw
@r_php
https://symfony.com/blog/new-in-symfony-7-3-simpler-server-event-streaming?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1kf65kw
@r_php
Symfony
New in Symfony 7.3: Simpler Server Event Streaming (Symfony Blog)
In Symfony 7.3, streaming server-sent events is now simpler thanks to the new ServerEvent and EventStreamResponse classes.