Running locally
Since I am old school and relearning everything. I have started a project for practicing.
I've got a question to start with.
Running Windows 11 on xampp:
I want to run the app through the browser to list my directories for Movies, Music, Gallery.
Instead of bouncing all over in window explorer i would have a central place for all my entertainment.
Does php have the function of listing directories on my machine and then spit those results out in a webpage. Locally.
thanks.
ps. Perhaps even sorting those listings in a useful fashion. :)
https://redd.it/1nmnhyq
@r_php
Since I am old school and relearning everything. I have started a project for practicing.
I've got a question to start with.
Running Windows 11 on xampp:
I want to run the app through the browser to list my directories for Movies, Music, Gallery.
Instead of bouncing all over in window explorer i would have a central place for all my entertainment.
Does php have the function of listing directories on my machine and then spit those results out in a webpage. Locally.
thanks.
ps. Perhaps even sorting those listings in a useful fashion. :)
https://redd.it/1nmnhyq
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
I have built a free visual database design tool
Hello everyone,
Many of you here work on Database design, so I thought I’d share a tool I’ve built.
I’d been planning for a long time to create a database design tool that truly fits my workflow. And finally, I’ve released my NoSQL (Indexed DB) Powered SQL Database Design Tool (yes, this sounds a bit funny IMO).
It’s free and open source — anyone can use it. You’re also welcome to give feedback or contribute.
You can create unlimited diagrams with no restrictions. It’s a privacy-focused app — your data stays with you.
After designing a database, you can export directly to Laravel, TypeORM, or Django migration files.
It also comes with zones (with lock/unlock functions), notes with copy and paste capabilities, keyboard shortcuts, and many other features to boost productivity. It’s built to handle large diagrams and is highly scalable.
I hope you’ll like it! Everyone’s invited to try it out:
GitHub: https://github.com/AHS12/thoth-blueprint
App: https://thoth-blueprint.vercel.app/
https://redd.it/1nmosxo
@r_php
Hello everyone,
Many of you here work on Database design, so I thought I’d share a tool I’ve built.
I’d been planning for a long time to create a database design tool that truly fits my workflow. And finally, I’ve released my NoSQL (Indexed DB) Powered SQL Database Design Tool (yes, this sounds a bit funny IMO).
It’s free and open source — anyone can use it. You’re also welcome to give feedback or contribute.
You can create unlimited diagrams with no restrictions. It’s a privacy-focused app — your data stays with you.
After designing a database, you can export directly to Laravel, TypeORM, or Django migration files.
It also comes with zones (with lock/unlock functions), notes with copy and paste capabilities, keyboard shortcuts, and many other features to boost productivity. It’s built to handle large diagrams and is highly scalable.
I hope you’ll like it! Everyone’s invited to try it out:
GitHub: https://github.com/AHS12/thoth-blueprint
App: https://thoth-blueprint.vercel.app/
https://redd.it/1nmosxo
@r_php
GitHub
GitHub - AHS12/thoth-blueprint: Free visual database design tool with drag-and-move editing, multi-format export, and migration…
Free visual database design tool with drag-and-move editing, multi-format export, and migration generation for popular frameworks. - AHS12/thoth-blueprint
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/1nmxawm
@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/1nmxawm
@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.
I’m building Xray a free, open-source debugger, and I want you to join me on the journey
https://redd.it/1nn36n7
@r_php
https://redd.it/1nn36n7
@r_php
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/1nnboj2
@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/1nnboj2
@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/1nnemcl
@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/1nnemcl
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Introducing Stream Pulse: Reliable Event Streaming for Laravel Applications
I'm excited to share StreamPulse, a package I've been working on to solve distributed event streaming in the Laravel ecosystem.
What is StreamPulse?
StreamPulse provides a clean, Laravel-native way to publish and consume events between distributed applications. Built on Redis Streams, it handles all the complexity of reliable messaging while giving you a simple API that feels right at home in Laravel.
Key Features
Laravel-native experience with an API that feels familiar
Transaction-aware publishing - events tied to your database transactions
Resilient processing with automatic retries and dead letter queues
Monitoring dashboard to visualize and manage your streams
Redis Streams integration with plans for additional drivers
Why I Built This
Working with distributed systems in Laravel, I found myself repeatedly implementing custom solutions for reliable cross-application messaging. StreamPulse abstracts all that complexity away, letting you focus on your business logic.
Beta Release - Feedback Welcome!
This is a beta release, and I'd love your feedback! Try it out, open issues, suggest features, or contribute code.
Check it out: https://github.com/saravanasai/stream-pulse
If you find this useful, please consider giving it a star!
https://redd.it/1nnewd8
@r_php
I'm excited to share StreamPulse, a package I've been working on to solve distributed event streaming in the Laravel ecosystem.
What is StreamPulse?
StreamPulse provides a clean, Laravel-native way to publish and consume events between distributed applications. Built on Redis Streams, it handles all the complexity of reliable messaging while giving you a simple API that feels right at home in Laravel.
Key Features
Laravel-native experience with an API that feels familiar
Transaction-aware publishing - events tied to your database transactions
Resilient processing with automatic retries and dead letter queues
Monitoring dashboard to visualize and manage your streams
Redis Streams integration with plans for additional drivers
Why I Built This
Working with distributed systems in Laravel, I found myself repeatedly implementing custom solutions for reliable cross-application messaging. StreamPulse abstracts all that complexity away, letting you focus on your business logic.
Beta Release - Feedback Welcome!
This is a beta release, and I'd love your feedback! Try it out, open issues, suggest features, or contribute code.
Check it out: https://github.com/saravanasai/stream-pulse
If you find this useful, please consider giving it a star!
https://redd.it/1nnewd8
@r_php
GitHub
GitHub - saravanasai/stream-pulse: StreamPulse is a Laravel package for event streaming with support for multiple drivers. It provides…
StreamPulse is a Laravel package for event streaming with support for multiple drivers. It provides a simple, unified API for publishing and consuming events across different streaming platforms. -...
Does it make sense to have Filament on a separate codebase?
We are building an app, and as the codebase grows bigger so does complexity, and tests and tools like PHPStan and ci as a whole become slower and slower.
We are debating it, is it worth having the Filament panel as its own codebase? I can see a lot of advantages, it can use its own little sqlite database to manage its own things and communications with the main app's codebase can be easily done via https requests. We tested it and we happy on how it works.
But what's killing the entushiasm is the repetition, we need to have the same Models with some of the same methods on both codebases, the same Enums. Both codebase versions need to be in sync to work togheter, which is not a big deal on itselfs, but is another thing to keep track of and quickly adds up mental overhead.
What are you thoughts?
Did you encouter this problem before? How did you takle it? How would you takle it?
Discuss.
https://redd.it/1nnhu8m
@r_php
We are building an app, and as the codebase grows bigger so does complexity, and tests and tools like PHPStan and ci as a whole become slower and slower.
We are debating it, is it worth having the Filament panel as its own codebase? I can see a lot of advantages, it can use its own little sqlite database to manage its own things and communications with the main app's codebase can be easily done via https requests. We tested it and we happy on how it works.
But what's killing the entushiasm is the repetition, we need to have the same Models with some of the same methods on both codebases, the same Enums. Both codebase versions need to be in sync to work togheter, which is not a big deal on itselfs, but is another thing to keep track of and quickly adds up mental overhead.
What are you thoughts?
Did you encouter this problem before? How did you takle it? How would you takle it?
Discuss.
https://redd.it/1nnhu8m
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
How to Change Algorithms in Symfony without Code Modifications: The Strategy Pattern
https://ngandu.hashnode.dev/symfony-strategy-design-pattern
https://redd.it/1nnk87w
@r_php
https://ngandu.hashnode.dev/symfony-strategy-design-pattern
https://redd.it/1nnk87w
@r_php
SymfonyCon Amsterdam 2025: Strategic DDD
https://symfony.com/blog/symfonycon-amsterdam-2025-strategic-ddd?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nnn2rb
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-strategic-ddd?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nnn2rb
@r_php
Symfony
SymfonyCon Amsterdam 2025: Strategic DDD (Symfony Blog)
Join Rob Allen to explore the strategic side of Domain Driven Design—and learn how better communication can turn business needs into truly maintainable software.
A simple package adding a validation rule to detect spammy input
Sifter
I've got a couple of side-projects that use the standard Laravel registration form, and I noticed everyday would be a few users created where the name field was like "GEbCeZlhiT" and "XpNGxMfw"... obvious spam. My first step was a simple honeypot using a 'phone number' field... but no luck. Then, on one of the sites, I added a Cloudflare captcha widget... and even then, I'd get a couple that would come through.
Since very few people have more than 2 or 3 capital letters in their name, I created my own validation rule. That got rid of a few more. Then I recreated one to check for names with no vowels, or lots of consonants without what I'd consider enough vowels.
Finally, I wrapped them all up in a single, configurable validation rule. And this is it.
As I note in the readme, this a brute-force validation -- I still get spam accounts where the random characters just happen to pass, it's just down 1 every couple of weeks instead of multiple a day. And if a "real" person mashes keys because they don't want to give their real name, they'll get a 404 page. Since these are for side projects of mine, it's a tradeoff I'm ok with.
Feel free to check it out, if it's something you've noticed. And it's all configurable, so you can toggle on/off the rules or even create your own.
https://redd.it/1nnq80g
@r_php
Sifter
I've got a couple of side-projects that use the standard Laravel registration form, and I noticed everyday would be a few users created where the name field was like "GEbCeZlhiT" and "XpNGxMfw"... obvious spam. My first step was a simple honeypot using a 'phone number' field... but no luck. Then, on one of the sites, I added a Cloudflare captcha widget... and even then, I'd get a couple that would come through.
Since very few people have more than 2 or 3 capital letters in their name, I created my own validation rule. That got rid of a few more. Then I recreated one to check for names with no vowels, or lots of consonants without what I'd consider enough vowels.
Finally, I wrapped them all up in a single, configurable validation rule. And this is it.
As I note in the readme, this a brute-force validation -- I still get spam accounts where the random characters just happen to pass, it's just down 1 every couple of weeks instead of multiple a day. And if a "real" person mashes keys because they don't want to give their real name, they'll get a 404 page. Since these are for side projects of mine, it's a tradeoff I'm ok with.
Feel free to check it out, if it's something you've noticed. And it's all configurable, so you can toggle on/off the rules or even create your own.
https://redd.it/1nnq80g
@r_php
packagist.org
matula/sifter - Packagist
Detect spammy input on Laravel forms
In 20 years this is my favourite function that I've ever written.
function dateSuffix($x){
$s = [0,"st","nd","rd"];
return (in_array($x,[1,2,3,21,22,23,31])) ? $s[$x % 10] : "th";
}
https://redd.it/1nnu6tj
@r_php
function dateSuffix($x){
$s = [0,"st","nd","rd"];
return (in_array($x,[1,2,3,21,22,23,31])) ? $s[$x % 10] : "th";
}
https://redd.it/1nnu6tj
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Multi-Agent Systems in PHP: A Practical Deep Research Implementation
https://inspector.dev/multi-agent-systems-in-php-a-practical-deep-research-implementation/
https://redd.it/1nnv91o
@r_php
https://inspector.dev/multi-agent-systems-in-php-a-practical-deep-research-implementation/
https://redd.it/1nnv91o
@r_php
Inspector
Multi-Agent Systems in PHP: A Practical Deep Research Implementation
Learn to build sophisticated multi-agent AI systems in PHP using Neuron's event-driven workflows and real-time streaming capabilities.
Novel SQL Injection Technique in PDO Prepared Statements
https://slcyber.io/assetnote-security-research-center/a-novel-technique-for-sql-injection-in-pdos-prepared-statements/
https://redd.it/1no41lk
@r_php
https://slcyber.io/assetnote-security-research-center/a-novel-technique-for-sql-injection-in-pdos-prepared-statements/
https://redd.it/1no41lk
@r_php
Searchlight Cyber
Novel SQL Injection Technique in PDO Prepared Statements
Searchlight Cyber's Security Research team details a Novel Technique for SQL Injection in PDO's Prepared Statements.
Free Performance Boost
We switched from PHP-FPM to Nginx Unit to juice out more performance out of our apps, and it’s actually much faster. Not as fast as Octane, but still enough for us to terminate about 40% of the servers the app was running.
Just a heads up for people. It also behaves like FPM, no need to adapt your service controllers like Octane requires you to.
I don’t exactly know why Unit is much, much faster, but it works really well.
https://redd.it/1no963s
@r_php
We switched from PHP-FPM to Nginx Unit to juice out more performance out of our apps, and it’s actually much faster. Not as fast as Octane, but still enough for us to terminate about 40% of the servers the app was running.
Just a heads up for people. It also behaves like FPM, no need to adapt your service controllers like Octane requires you to.
I don’t exactly know why Unit is much, much faster, but it works really well.
https://redd.it/1no963s
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
How to Prepare for a 2 Hour Full Stack Developer Technical Interview
https://www.getmakedigital.com/blogs/dev-careers/fullstack-interview-guide
https://redd.it/1noeub1
@r_php
https://www.getmakedigital.com/blogs/dev-careers/fullstack-interview-guide
https://redd.it/1noeub1
@r_php
Getmakedigital
How to Prepare for a 2 Hour Full Stack Developer Technical Interview
Learn how to effectively prepare for a 2 hour full stack developer technical interview, covering behavioral questions, coding exercises, and essential technical skills.
SymfonyCon Amsterdam 2025: Rediscover the Console
https://symfony.com/blog/symfonycon-amsterdam-2025-rediscover-the-console?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nohzpp
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-rediscover-the-console?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1nohzpp
@r_php
Symfony
SymfonyCon Amsterdam 2025: Rediscover the Console (Symfony Blog)
💻 Join Robin Chalas to explore Symfony’s most ubiquitous component, its brand-new redesign in 7.3, and the possibilities it unlocks for the future!
Media is too big
VIEW IN TELEGRAM
FilaForms - Native Filament form builder I built (visual builder, submissions, notifications, analytics)
https://redd.it/1nomon2
@r_php
https://redd.it/1nomon2
@r_php
In 20 years this is most surprisingly useful function I've written.
Inspired by the other post. This is a function that at first shouldn't be necessary (sql usually sorts well),
but it has proven surprisingly useful. d_sortarray() is basically collator_asort (EDIT: sorts by users language!)
# sorts a query result, fieldname can be an array
# example : d_sortresults($query_result, 'percentage', $num_rows);
function d_sortresults(array &$qA, $fieldname, $num)
{
$copyA = $qA;
for ($i = 0; $i < $num; $i++)
{
if (is_array($fieldname))
{
$tosortA[$i] = '';
foreach($fieldname as $part)
{
$tosortA[$i] .= $qA[$i][$part];
}
}
else
{
$tosortA[$i] = $qA[$i][$fieldname];
}
}
if (isset($tosortA) && is_array($tosortA))
{
d_sortarray($tosortA);
$i = -1;
foreach($tosortA as $key => $v)
{
$i++;
$qA[$i] = $copyA[$key];
}
}
}
https://redd.it/1nolui6
@r_php
Inspired by the other post. This is a function that at first shouldn't be necessary (sql usually sorts well),
but it has proven surprisingly useful. d_sortarray() is basically collator_asort (EDIT: sorts by users language!)
# sorts a query result, fieldname can be an array
# example : d_sortresults($query_result, 'percentage', $num_rows);
function d_sortresults(array &$qA, $fieldname, $num)
{
$copyA = $qA;
for ($i = 0; $i < $num; $i++)
{
if (is_array($fieldname))
{
$tosortA[$i] = '';
foreach($fieldname as $part)
{
$tosortA[$i] .= $qA[$i][$part];
}
}
else
{
$tosortA[$i] = $qA[$i][$fieldname];
}
}
if (isset($tosortA) && is_array($tosortA))
{
d_sortarray($tosortA);
$i = -1;
foreach($tosortA as $key => $v)
{
$i++;
$qA[$i] = $copyA[$key];
}
}
}
https://redd.it/1nolui6
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
A Call for Sustainable Open Source Infrastructure
https://blog.packagist.com/a-call-for-sustainable-open-source-infrastructure/
https://redd.it/1noq6q1
@r_php
https://blog.packagist.com/a-call-for-sustainable-open-source-infrastructure/
https://redd.it/1noq6q1
@r_php
Private Packagist
A Call for Sustainable Open Source Infrastructure
Today, we joined other major package registries in signing an important joint statement on sustainable stewardship of open source infrastructure. Together with Maven Central, PyPI, crates.io, Open VSX, OpenJS Foundation, OpenSSF and Alpha-Omega, we're addressing…