Some PHPStorm discount coupons. 20% Off
1. SDFUY-7AWUL-ED5GF-V387A-8G8LV
2. FWR2Z-AE85B-H8DQN-G343W-R4D6T
https://redd.it/1m0ovau
@r_php
1. SDFUY-7AWUL-ED5GF-V387A-8G8LV
2. FWR2Z-AE85B-H8DQN-G343W-R4D6T
https://redd.it/1m0ovau
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Filter Eloquent models via URL query strings
Hi r/laravel 👋
I've built a package to filter Eloquent models using URL query strings. The package is goodcat/laravel-querystring. I was inspired by Laravel's Local Scope. I'm using the attribute
// http://example.com/users?email=john@doe.com
class User extends Authenticatable
{
use UseQueryString;
#QueryString('email')
public function filterByEmail(Builder $query, string $search): void
{
$query->where('email', $search);
}
}
I’m adding the
class UserController extends Controller
{
public function index(Request $request): View
{
$users = User::query()->queryString($request)->get();
return view('user.index', 'users' => $users);
}
}
Inside the query, I'm using the
There are other functionalities like caching, custom filter objects, multiple
https://redd.it/1m0two7
@r_php
Hi r/laravel 👋
I've built a package to filter Eloquent models using URL query strings. The package is goodcat/laravel-querystring. I was inspired by Laravel's Local Scope. I'm using the attribute
#[QueryString] to tag a method as a "filter" and the Reflection API to map the query string name to the filter. Here's an example:// http://example.com/users?email=john@doe.com
class User extends Authenticatable
{
use UseQueryString;
#QueryString('email')
public function filterByEmail(Builder $query, string $search): void
{
$query->where('email', $search);
}
}
I’m adding the
UseQueryString trait to the User model and marking a method with the QueryString attribute.class UserController extends Controller
{
public function index(Request $request): View
{
$users = User::query()->queryString($request)->get();
return view('user.index', 'users' => $users);
}
}
Inside the query, I'm using the
queryString($request) scope, passing it the request. The query string is automatically mapped to the method, and the filter we wrote earlier is applied. I'm really curious to know what you think!There are other functionalities like caching, custom filter objects, multiple
QueryString attributes, etc.https://redd.it/1m0two7
@r_php
GitHub
GitHub - goodcat-dev/laravel-querystring: A Laravel package to filter Eloquent models using query string parameters.
A Laravel package to filter Eloquent models using query string parameters. - goodcat-dev/laravel-querystring
PHP Async lib without extensions and concurrent libs
https://github.com/terremoth/php-async
https://redd.it/1m0vg6k
@r_php
https://github.com/terremoth/php-async
https://redd.it/1m0vg6k
@r_php
GitHub
GitHub - terremoth/php-async: Async and Parallel Processing with PHP with no threads or reactive libs
Async and Parallel Processing with PHP with no threads or reactive libs - terremoth/php-async
Thinking of building a faster PHP VM, curious what you think about dropping some dynamic features
I'm working on a side project, still early, where I'm exploring the idea of building a faster PHP VM written in Rust, with a strong focus on performance and memory efficiency, especially for server-side use.
I'm not aiming to replace PHP or reinvent the language, and I would like it to remain compatible with regular PHP code as much as possible.
That said, I’m seriously considering dropping or restricting some of PHP’s most dynamic features, because I believe the potential performance gains could be significant.
For example:
* No *variable variables* (`$$var`)
* Requiring static paths in `include()`/`require()`
* Disallowing `eval()`
Removing these might allow for:
* Much better memory management (e.g. tracking variable lifetimes and avoiding unnecessary copies)
* Optimizations like early freeing or move semantics
* Easier static analysis and faster bytecode execution
So I’m wondering:
* Would this kind of approach make sense to you?
* Are those dynamic features essential in your real-world usage?
* Do you think a faster VM with these trade-offs would be useful?
I’d really appreciate any thoughts or perspectives from PHP developers.
https://redd.it/1m0z3eg
@r_php
I'm working on a side project, still early, where I'm exploring the idea of building a faster PHP VM written in Rust, with a strong focus on performance and memory efficiency, especially for server-side use.
I'm not aiming to replace PHP or reinvent the language, and I would like it to remain compatible with regular PHP code as much as possible.
That said, I’m seriously considering dropping or restricting some of PHP’s most dynamic features, because I believe the potential performance gains could be significant.
For example:
* No *variable variables* (`$$var`)
* Requiring static paths in `include()`/`require()`
* Disallowing `eval()`
Removing these might allow for:
* Much better memory management (e.g. tracking variable lifetimes and avoiding unnecessary copies)
* Optimizations like early freeing or move semantics
* Easier static analysis and faster bytecode execution
So I’m wondering:
* Would this kind of approach make sense to you?
* Are those dynamic features essential in your real-world usage?
* Do you think a faster VM with these trade-offs would be useful?
I’d really appreciate any thoughts or perspectives from PHP developers.
https://redd.it/1m0z3eg
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Building "Lovable for Laravel" - would love your feedback
Hey everyone,
I'm working on ArtisanKit - essentially Lovable.dev but specifically for Laravel developers.
The idea is simple: describe your app in plain English, get a working Laravel application. No more starting from scratch or dealing with boilerplate. Just chat with AI about what you want to build.
It generates:
\- Laravel 12 backend with proper patterns
\- React/Vue + TypeScript frontend
\- Database migrations and models
\- Full authentication flow
\- Ready to deploy
What makes it different from generic AI tools is that it actually understands Laravel conventions and best practices. It builds apps the way a senior Laravel developer would.
I'd love to get feedback from the community:
1. What features would actually be useful vs just hype?
2. What's your biggest pain point when usign AI coding agents with Laravel?
3. Would you use something like this?
If you're interested in trying it when it launches, I set up a waitlist at artisankit.ai
Not trying to spam - genuinely want to build something useful for our community. Happy to answer any questions!
https://redd.it/1m13pg5
@r_php
Hey everyone,
I'm working on ArtisanKit - essentially Lovable.dev but specifically for Laravel developers.
The idea is simple: describe your app in plain English, get a working Laravel application. No more starting from scratch or dealing with boilerplate. Just chat with AI about what you want to build.
It generates:
\- Laravel 12 backend with proper patterns
\- React/Vue + TypeScript frontend
\- Database migrations and models
\- Full authentication flow
\- Ready to deploy
What makes it different from generic AI tools is that it actually understands Laravel conventions and best practices. It builds apps the way a senior Laravel developer would.
I'd love to get feedback from the community:
1. What features would actually be useful vs just hype?
2. What's your biggest pain point when usign AI coding agents with Laravel?
3. Would you use something like this?
If you're interested in trying it when it launches, I set up a waitlist at artisankit.ai
Not trying to spam - genuinely want to build something useful for our community. Happy to answer any questions!
https://redd.it/1m13pg5
@r_php
lovable.dev
Lovable - Build Apps & Websites with AI, Fast | No Code App Builder
Lovable is an AI app and website builder that turns ideas into production-ready software without coding. Launch faster with AI.
Anyone using Laravel Octane with FrankenPHP on production?
So we are evaluating production deployments for our distributed system and at the moment are considering serversideup nginx images or FrankenPHP. Our systems has to handle traffic from on average 5-10k IoT devices per cluster. It's a distributed micro-service system. We haven't done any benchmark at our end for both and serversideup images are our fallback option; So wondering if anyone has been running FrankenPHP in production and has there been any issues or so?
https://redd.it/1m15i3a
@r_php
So we are evaluating production deployments for our distributed system and at the moment are considering serversideup nginx images or FrankenPHP. Our systems has to handle traffic from on average 5-10k IoT devices per cluster. It's a distributed micro-service system. We haven't done any benchmark at our end for both and serversideup images are our fallback option; So wondering if anyone has been running FrankenPHP in production and has there been any issues or so?
https://redd.it/1m15i3a
@r_php
PHP Docker Images (serversideup/php)
Production-ready PHP Docker images for Laravel, WordPress, and more.
Messenger retry without config permission in Rabbit
As the noscript says, I need to configure retry without access to creating new queues (I can still create them manually in the dashboard).
Is there a way to implement retries on predefined queues? Or maybe there is another solution that I haven't considered?
Symfony 7.3
https://redd.it/1m16f9j
@r_php
As the noscript says, I need to configure retry without access to creating new queues (I can still create them manually in the dashboard).
Is there a way to implement retries on predefined queues? Or maybe there is another solution that I haven't considered?
Symfony 7.3
https://redd.it/1m16f9j
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
TrueAsync Chronicles
Hi everyone,
A lot has happened since the first announcement of the TrueAsync RFC. And now, with the first alpha release of the extension out and the official RFC for core changes published, it’s a good moment to share an update.
Why hasn’t the current RFC been put up for a vote yet?
Digging through documents from other programming languages, forum posts, and working group notes, it became clear that no language has managed to design a good async API on the first try.
It’s not just about complexity—it’s that solutions which seem good initially often don’t hold up in practice.
Even if a single person made the final decision, the first attempt would likely have serious flaws. It’s a bit like Fred Brooks’ idea in The Mythical Man-Month: “Build one to throw away.” So I’ve concluded that trying to rush an RFC — even “fast enough” — would be a mistake, even if we had five or seven top-level experts available.
So what’s the plan?
Here the PHP community (huge thanks to everyone involved!) and the PHP core team came through with a better idea: releasing an experimental version is far preferable to aiming for a fully polished RFC up front. The strategy now is:
1. Allow people to try async in PHP under experimental status.
2. Once enough experience is gathered, finalize the RFC.
Development has split into two repos: https://github.com/true-async:
1. PHP itself and the low-level engine API.
2. A separate extension that implements this API.
This split lets PHP’s core evolve independently from specific functions like spawn/await. That’s great news because it enables progress even before the RFC spec is locked in.
As a result, there’s now a separate RFC focused just on core engine changes: https://wiki.php.net/rfc/true\_async\_engine\_api
If the proposed API code is accepted in full, PHP 8.5 would include all the features currently found in the TrueAsync extension. But in the meantime, you can try it out in Docker: https://github.com/true-async/php-async/blob/main/Dockerfile
I firmly believe that early access to new features is a crucial design tool in software engineering. So a prebuilt Windows binary will be available soon (it basically exists already but needs some polishing!).
What’s under the hood of the TrueAsync extension?
TrueAsync ext uses LibUV 1.44+ and PHP fibers (via C code) to implement coroutines.
Fibers enable transparent async support without breaking existing code. You can call
The scheduler algorithm has been completely redesigned to halve the number of context switches. Coroutines can “jump” directly into any other coroutine from virtually any place — even deep inside C code. You can break the execution flow however and whenever you want, and resume under any conditions you choose. This is exactly what adapted C functions like
Of course, the TrueAsync extension also lets you do this explicitly with the
The current list of adapted PHP functions that perform context switches is available here:
https://github.com/true-async/php-async?tab=readme-ov-file#adapted-php-functions
It’s already quite enough to build plenty of useful things. This even includes functions like
And you can try all of this out today. :)
https://redd.it/1m18m4c
@r_php
Hi everyone,
A lot has happened since the first announcement of the TrueAsync RFC. And now, with the first alpha release of the extension out and the official RFC for core changes published, it’s a good moment to share an update.
Why hasn’t the current RFC been put up for a vote yet?
Digging through documents from other programming languages, forum posts, and working group notes, it became clear that no language has managed to design a good async API on the first try.
It’s not just about complexity—it’s that solutions which seem good initially often don’t hold up in practice.
Even if a single person made the final decision, the first attempt would likely have serious flaws. It’s a bit like Fred Brooks’ idea in The Mythical Man-Month: “Build one to throw away.” So I’ve concluded that trying to rush an RFC — even “fast enough” — would be a mistake, even if we had five or seven top-level experts available.
So what’s the plan?
Here the PHP community (huge thanks to everyone involved!) and the PHP core team came through with a better idea: releasing an experimental version is far preferable to aiming for a fully polished RFC up front. The strategy now is:
1. Allow people to try async in PHP under experimental status.
2. Once enough experience is gathered, finalize the RFC.
Development has split into two repos: https://github.com/true-async:
1. PHP itself and the low-level engine API.
2. A separate extension that implements this API.
This split lets PHP’s core evolve independently from specific functions like spawn/await. That’s great news because it enables progress even before the RFC spec is locked in.
As a result, there’s now a separate RFC focused just on core engine changes: https://wiki.php.net/rfc/true\_async\_engine\_api
If the proposed API code is accepted in full, PHP 8.5 would include all the features currently found in the TrueAsync extension. But in the meantime, you can try it out in Docker: https://github.com/true-async/php-async/blob/main/Dockerfile
I firmly believe that early access to new features is a crucial design tool in software engineering. So a prebuilt Windows binary will be available soon (it basically exists already but needs some polishing!).
What’s under the hood of the TrueAsync extension?
TrueAsync ext uses LibUV 1.44+ and PHP fibers (via C code) to implement coroutines.
Fibers enable transparent async support without breaking existing code. You can call
spawn literally anywhere — even inside register_shutdown_function() (although that’s arguably risky!). Meanwhile, regular functions keep working unchanged. In other words: no colored functions.The scheduler algorithm has been completely redesigned to halve the number of context switches. Coroutines can “jump” directly into any other coroutine from virtually any place — even deep inside C code. You can break the execution flow however and whenever you want, and resume under any conditions you choose. This is exactly what adapted C functions like
sleep() do: when you call sleep(), you’re implicitly switching your coroutine to another one.Of course, the TrueAsync extension also lets you do this explicitly with the
Async\suspend() function.The current list of adapted PHP functions that perform context switches is available here:
https://github.com/true-async/php-async?tab=readme-ov-file#adapted-php-functions
It’s already quite enough to build plenty of useful things. This even includes functions like
ob_start(), which correctly handle coroutine switching and can safely collect output from different functions concurrently.And you can try all of this out today. :)
https://redd.it/1m18m4c
@r_php
GitHub
True Async
Implementation of native asynchrony at the PHP core level - True Async
An educational look into the Tempest PHP framework
https://sevalla.com/blog/tempest-php/
https://redd.it/1m18s21
@r_php
https://sevalla.com/blog/tempest-php/
https://redd.it/1m18s21
@r_php
Sevalla
An educational look into the Tempest PHP framework
Discover how Tempest, a modern PHP framework, uses code discovery and the latest PHP features to simplify app development and boost productivity.
Short function
A new RFC about short function (here called Single-Expression functions) is currently in voting phase : https://wiki.php.net/rfc/single-expression-functions
About 5 years ago another RFC about the same syntax has been declined : https://wiki.php.net/rfc/short-functions
And the result is really mixed (from the previous RFC, the no is only sligthly ahead).
So, what do you think about this RFC, and change that can make PHP slightly less verbose, without introducing real features ?
Does complexifying the syntax is worth it if it can reduce the code size / give a more pleasant UX ?
https://redd.it/1m1bfad
@r_php
A new RFC about short function (here called Single-Expression functions) is currently in voting phase : https://wiki.php.net/rfc/single-expression-functions
About 5 years ago another RFC about the same syntax has been declined : https://wiki.php.net/rfc/short-functions
And the result is really mixed (from the previous RFC, the no is only sligthly ahead).
So, what do you think about this RFC, and change that can make PHP slightly less verbose, without introducing real features ?
Does complexifying the syntax is worth it if it can reduce the code size / give a more pleasant UX ?
https://redd.it/1m1bfad
@r_php
Zend PHP Certification Exam & Other Certifications Advice
Hello everybody, so I've been using PHP for six years, but I have no Bachelor's Degree or certifications outside of PHP Basics from W3 Schools. How I got my much, I have no idea, but I do good work and they like me. However, I'm trying to get some certs under my belt so perhaps I could find a higher paying position and be a better developer. My boss has agreed to purchase me the Zend PHP Certification Exam as he feels we could advertise the certification on the company website. I'm thrilled to add this to my resume and have begun studying. The resource I'm using is this.
https://github.com/ivantusek/Zend-PHP-Certification
It appears to be well done and legitimate and I'm making flashcards of all the questions so I can really study as well as for the few examples I don't understand, playing around with them on my local host until I have a thorough understanding. Is this enough? I would be so embarrassed to fail this exam on my bosses dime and then have to pay for it on my own and I don't want to ruin the chance for my boss to pay for more certifications (would like one in PHP Security). Any suggestions on how I can guarantee I pass the exam with flying colors? Hoping to take it at the end of August.
https://redd.it/1m1ecym
@r_php
Hello everybody, so I've been using PHP for six years, but I have no Bachelor's Degree or certifications outside of PHP Basics from W3 Schools. How I got my much, I have no idea, but I do good work and they like me. However, I'm trying to get some certs under my belt so perhaps I could find a higher paying position and be a better developer. My boss has agreed to purchase me the Zend PHP Certification Exam as he feels we could advertise the certification on the company website. I'm thrilled to add this to my resume and have begun studying. The resource I'm using is this.
https://github.com/ivantusek/Zend-PHP-Certification
It appears to be well done and legitimate and I'm making flashcards of all the questions so I can really study as well as for the few examples I don't understand, playing around with them on my local host until I have a thorough understanding. Is this enough? I would be so embarrassed to fail this exam on my bosses dime and then have to pay for it on my own and I don't want to ruin the chance for my boss to pay for more certifications (would like one in PHP Security). Any suggestions on how I can guarantee I pass the exam with flying colors? Hoping to take it at the end of August.
https://redd.it/1m1ecym
@r_php
GitHub
GitHub - ivantusek/Zend-PHP-Certification: Zend PHP Certification Study Guide.
Zend PHP Certification Study Guide. Contribute to ivantusek/Zend-PHP-Certification development by creating an account on GitHub.
Boost Your Productivity: PHP DataGrid with AI Assistant!
Hey devs! I just launched a new feature on GridPHP — an AI-powered assistant built right into the PHP DataGrid.
It helps you:
✔ Get instant summaries and reports from your DataGrid
✔ Ask complex queries and receive smart insights
✔ Automate analysis without writing complex SQL queries
✔ Provide smart suggestions for better data analysis
No complex setup — just plug it in and start working smarter.
Would love feedback from the community! 🙌
Check it out: https://www.gridphp.com/datagrid-ai-assistant/
https://redd.it/1m1w9l3
@r_php
Hey devs! I just launched a new feature on GridPHP — an AI-powered assistant built right into the PHP DataGrid.
It helps you:
✔ Get instant summaries and reports from your DataGrid
✔ Ask complex queries and receive smart insights
✔ Automate analysis without writing complex SQL queries
✔ Provide smart suggestions for better data analysis
No complex setup — just plug it in and start working smarter.
Would love feedback from the community! 🙌
Check it out: https://www.gridphp.com/datagrid-ai-assistant/
https://redd.it/1m1w9l3
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
What Modern PHP Looks Like in 2025
https://amirkamizi.com/blog/what-modern-php-looks-like-in-2025
https://redd.it/1m21wpn
@r_php
https://amirkamizi.com/blog/what-modern-php-looks-like-in-2025
https://redd.it/1m21wpn
@r_php
Amir Kamizi
What Modern PHP Looks Like in 2025 | Amir Kamizi
PHP has quietly evolved over the years, shedding many of its dated stereotypes while embracing modern programming practices and tooling. What used to be a language mocked for its inconsistencies and spaghetti-code reputation is now a mature, robust, and highly…
Does Laravel Nightwatch not show custom data from the context API?
Am I crazy, or is that custom data not available in Nightwatch? Seems like a big oversight if true, being a first party framework feature.
https://redd.it/1m23iew
@r_php
Am I crazy, or is that custom data not available in Nightwatch? Seems like a big oversight if true, being a first party framework feature.
https://redd.it/1m23iew
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Tempest 1.4 adds mailing support (built on top of Symfony)
https://tempestphp.com/blog/mail-component
https://redd.it/1m23cqf
@r_php
https://tempestphp.com/blog/mail-component
https://redd.it/1m23cqf
@r_php
Tempestphp
Mailing with Tempest — Tempest
The newest Tempest release adds mailing support
Open Source Clueless – Built a desktop AI meeting assistant using Laravel + NativePHP
Hey Laravel devs,
Just wanted to share something I hacked together over the last week — Clueless, a desktop AI meeting assistant built with Laravel 12, NativePHP, and Vue.
Yes, it runs as a native desktop app using Electron via NativePHP.
# 🧠 What it does (quickly):
Transcribes meetings in real time
Analyzes and provides meeting insights in real time.
Pulls out key moments like pricing, follow-ups, and decisions
Writes email drafts when you say you'll follow up
It uses SQLite for storing conversation data and is built with privacy in mind. Minimal by design.
# 🔧 Tech Stack:
Backend: Laravel 12 (PHP 8.2+)
Frontend: Vue 3.5.13 + TypeScript + Inertia.js
Desktop: NativePHP + Electron
Styling: Tailwind CSS 4.1.1
Database: SQLite for local conversation storage
Build Tool: Vite 6
NativePHP made it simple to extend a full Laravel stack into a desktop app context.
📂 Repo: https://github.com/vijaythecoder/clueless ⭐️ Star it if you’re curious — happy to answer any questions!
https://redd.it/1m268x0
@r_php
Hey Laravel devs,
Just wanted to share something I hacked together over the last week — Clueless, a desktop AI meeting assistant built with Laravel 12, NativePHP, and Vue.
Yes, it runs as a native desktop app using Electron via NativePHP.
# 🧠 What it does (quickly):
Transcribes meetings in real time
Analyzes and provides meeting insights in real time.
Pulls out key moments like pricing, follow-ups, and decisions
Writes email drafts when you say you'll follow up
It uses SQLite for storing conversation data and is built with privacy in mind. Minimal by design.
# 🔧 Tech Stack:
Backend: Laravel 12 (PHP 8.2+)
Frontend: Vue 3.5.13 + TypeScript + Inertia.js
Desktop: NativePHP + Electron
Styling: Tailwind CSS 4.1.1
Database: SQLite for local conversation storage
Build Tool: Vite 6
NativePHP made it simple to extend a full Laravel stack into a desktop app context.
📂 Repo: https://github.com/vijaythecoder/clueless ⭐️ Star it if you’re curious — happy to answer any questions!
https://redd.it/1m268x0
@r_php
GitHub
GitHub - vijaythecoder/clueless: Cluelessly - AI Meeting Assistant App
Cluelessly - AI Meeting Assistant App. Contribute to vijaythecoder/clueless development by creating an account on GitHub.
Migrating from a legacy application and database
I am yet another old php developer looking at migrating a legacy application (internally developed framework) to Symfony.
I have found a bunch of threads on the topic but not much resolution and they were all fairly out of date. So I am hoping there is some more modern option.
The situation I have is I have an old application with hundreds of established database tables. They are well structured and have outside analytics tools that reference them. So I cannot change them.
Is there any way to get Symfony with one of the ORMs to be able to automatically generate the needed entity entries. I know there used to be doctrine:mapping:import but it looks like that was removed.
The additional tricky bit is that it is a commercial database (Informix) that is not natively supported by doctrine, though I did find an old github project that looks like it set up most of the mappings for it.
I am very open to any advice or just finding out if I am kind of out of luck without a lot of manual work.
https://redd.it/1m28nh2
@r_php
I am yet another old php developer looking at migrating a legacy application (internally developed framework) to Symfony.
I have found a bunch of threads on the topic but not much resolution and they were all fairly out of date. So I am hoping there is some more modern option.
The situation I have is I have an old application with hundreds of established database tables. They are well structured and have outside analytics tools that reference them. So I cannot change them.
Is there any way to get Symfony with one of the ORMs to be able to automatically generate the needed entity entries. I know there used to be doctrine:mapping:import but it looks like that was removed.
The additional tricky bit is that it is a commercial database (Informix) that is not natively supported by doctrine, though I did find an old github project that looks like it set up most of the mappings for it.
I am very open to any advice or just finding out if I am kind of out of luck without a lot of manual work.
https://redd.it/1m28nh2
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Ridiculously simple dependency injection (DI) container
https://github.com/Wilaak/PicoDI
https://redd.it/1m2b418
@r_php
https://github.com/Wilaak/PicoDI
https://redd.it/1m2b418
@r_php
GitHub
GitHub - Wilaak/PicoDI: The ridiculously simple dependency injection (DI) container for PHP.
The ridiculously simple dependency injection (DI) container for PHP. - Wilaak/PicoDI
advice on developing PHP architecture skills
I have been developing small plugins for Wordpress and it has been ok building small plugins that do a couple of task. But my desire is to build bigger more complex plugins.
* So I started by watching Alecadd plugin tutorial on Youtube, this was good introduction,
* Then I read the Wordpress plugin handbook, which gives ideas in what to do but is not a tutorial
* Then I download several plugins and started studying code, but each plugin is different and there is not comments explaining architecture decision
My goal is to build very efficient plugins, but learning good architecture is hard, all tutorials I know don't teach architecture, just syntax and concepts. Can the community help? Any advice. Thank you
https://redd.it/1m2efl0
@r_php
I have been developing small plugins for Wordpress and it has been ok building small plugins that do a couple of task. But my desire is to build bigger more complex plugins.
* So I started by watching Alecadd plugin tutorial on Youtube, this was good introduction,
* Then I read the Wordpress plugin handbook, which gives ideas in what to do but is not a tutorial
* Then I download several plugins and started studying code, but each plugin is different and there is not comments explaining architecture decision
My goal is to build very efficient plugins, but learning good architecture is hard, all tutorials I know don't teach architecture, just syntax and concepts. Can the community help? Any advice. Thank you
https://redd.it/1m2efl0
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
I made an open source shell to enrich Laravel Tinker
If you’ve ever dove headfirst into a production server at 2 a.m., opened up **Laravel Tinker**, pasted a half‑forgotten piece of code from Slack just to fix a client’s data… you know the pain that introduced this project:
* **Copy‑paste roulette:** I maintained a personal graveyard of "maintenance noscripts" spread all over notes, Gists, and chat histories. Whenever something was broken, I searched for the appropriate one, adjusted a variable, hoped I didn't fat‑finger anything, and pressed enter.
* **Zero visibility:** I’d shoot off another throw-away fragment after patching to verify the system was *actually* healthy. It was impossible to find a single location to review *all* the relevant checks before and after executing code.
* **Production paranoia:** Tinker is powerful, but one wrong command can mangle live data. There’s no guard‑rail, no categorisation, no history you can audit later.
I soon came to my senses: *this workflow is a liability*, not a tool. I needed something custom‑built.
What if there were:
1. A **dedicated shell** that bootstraps the complete Laravel context.
2. A first‑class **noscript repository**: version‑controlled, discoverable, grouped by domain
3. **System checks** that can be executed before or after a noscript, with one command, and which return a definite OK/FAIL report.
4. **Safe mode** that refuses to do anything reckless when `APP_ENV=production`—unless you explicitly allow it.
That idea became **NodiShell**
# What NodiShell really solves
|Issue|How NodiShell resolves it|
|:-|:-|
|Scripts spread throughout chat, Gists, sticky notes|**Category‑based repository** (`app/Console/NodiShell/Scripts`) with autocomplete searching|
|Manual copy‑paste into Tinker|**Interactive menu** – arrow‑key navigation, fuzzy search, one‑hit execution|
|No repeatable health checks|**Pluggable system checks** (DB, cache, queues, your own) with colour‑coded results|
|Risky production changes|**Built‑in safety layer** (`--safe-mode`, `isProductionSafe()`) and confirm prompts|
|Losing context between noscripts|**Session-wide variable store** injected directly into Tinker|
That is, Tinker **with discipline**.
# Under the hood
* **Laravel native** – install with `composer require nodilabs/nodishell`.
* **Generator commands** – `php artisan nodishell:noscript` scaffolds a skeleton with type hints, docblocks, and error‑handling baked in.
* **Customisable UI** – emoji icons, colour themes and sort order so your ops team actually enjoys using it.
* **Autodiscovery** – put a PHP class somewhere under the `Scripts`, `Categories` or `Checks` dir, NodiShell finds it automatically, without service‑provider contortions.
# A 30-second Example
# run a one‑off repair
php artisan nodishell --noscript=reset-user-password
# or open the menu
php artisan nodishell
Select **“Maintenance → Reset User Password”**, enter the user’s email, and NodiShell fires the noscript, shows a success banner and leaves the result in `$lastResult`—ready for inspection in Tinker.
# Try it
composer require nodilabs/nodishell
php artisan vendor:publish --provider="NodiLabs\NodiShell\NodiShellServiceProvider"
php artisan nodishell
Five minutes and your first maintenance noscript will be executing & no more copy‑paste anxiety. Test it, feedbacks and PRs are always welcome!
Repository link: [https://github.com/nodilabs/nodishell](https://github.com/nodilabs/nodishell)
https://redd.it/1m2fjip
@r_php
If you’ve ever dove headfirst into a production server at 2 a.m., opened up **Laravel Tinker**, pasted a half‑forgotten piece of code from Slack just to fix a client’s data… you know the pain that introduced this project:
* **Copy‑paste roulette:** I maintained a personal graveyard of "maintenance noscripts" spread all over notes, Gists, and chat histories. Whenever something was broken, I searched for the appropriate one, adjusted a variable, hoped I didn't fat‑finger anything, and pressed enter.
* **Zero visibility:** I’d shoot off another throw-away fragment after patching to verify the system was *actually* healthy. It was impossible to find a single location to review *all* the relevant checks before and after executing code.
* **Production paranoia:** Tinker is powerful, but one wrong command can mangle live data. There’s no guard‑rail, no categorisation, no history you can audit later.
I soon came to my senses: *this workflow is a liability*, not a tool. I needed something custom‑built.
What if there were:
1. A **dedicated shell** that bootstraps the complete Laravel context.
2. A first‑class **noscript repository**: version‑controlled, discoverable, grouped by domain
3. **System checks** that can be executed before or after a noscript, with one command, and which return a definite OK/FAIL report.
4. **Safe mode** that refuses to do anything reckless when `APP_ENV=production`—unless you explicitly allow it.
That idea became **NodiShell**
# What NodiShell really solves
|Issue|How NodiShell resolves it|
|:-|:-|
|Scripts spread throughout chat, Gists, sticky notes|**Category‑based repository** (`app/Console/NodiShell/Scripts`) with autocomplete searching|
|Manual copy‑paste into Tinker|**Interactive menu** – arrow‑key navigation, fuzzy search, one‑hit execution|
|No repeatable health checks|**Pluggable system checks** (DB, cache, queues, your own) with colour‑coded results|
|Risky production changes|**Built‑in safety layer** (`--safe-mode`, `isProductionSafe()`) and confirm prompts|
|Losing context between noscripts|**Session-wide variable store** injected directly into Tinker|
That is, Tinker **with discipline**.
# Under the hood
* **Laravel native** – install with `composer require nodilabs/nodishell`.
* **Generator commands** – `php artisan nodishell:noscript` scaffolds a skeleton with type hints, docblocks, and error‑handling baked in.
* **Customisable UI** – emoji icons, colour themes and sort order so your ops team actually enjoys using it.
* **Autodiscovery** – put a PHP class somewhere under the `Scripts`, `Categories` or `Checks` dir, NodiShell finds it automatically, without service‑provider contortions.
# A 30-second Example
# run a one‑off repair
php artisan nodishell --noscript=reset-user-password
# or open the menu
php artisan nodishell
Select **“Maintenance → Reset User Password”**, enter the user’s email, and NodiShell fires the noscript, shows a success banner and leaves the result in `$lastResult`—ready for inspection in Tinker.
# Try it
composer require nodilabs/nodishell
php artisan vendor:publish --provider="NodiLabs\NodiShell\NodiShellServiceProvider"
php artisan nodishell
Five minutes and your first maintenance noscript will be executing & no more copy‑paste anxiety. Test it, feedbacks and PRs are always welcome!
Repository link: [https://github.com/nodilabs/nodishell](https://github.com/nodilabs/nodishell)
https://redd.it/1m2fjip
@r_php
GitHub
GitHub - nodilabs/nodishell: Laravel Interactive Shell with Script Repository and Tinker integration
Laravel Interactive Shell with Script Repository and Tinker integration - nodilabs/nodishell
Why did Laravel make translations file-based by default
Hi,
I've been programming Laravel for 5 years - I program a bilingual app, but I'm in America and our customers are in France -
I'm still learning a lot, but one thing that has been a nightmare for our project is translations -
Right now, we have a Caffeinated based module system, with a Lang folder for each module, along with en and fr for translations. I know that Caffeinated is outdated, but Nwidart apparently has a similar problem -
Apparently in Laravel, translations are taken from files by default, and there is no out of the box system for managing localization in the Database. Maybe I missed something... but when I use trans or __(), it seems like it is directly going to the file system.
This means that translations have now become a part of the source code... which I guess it makes sense, because it's the developers who come with new ideas for views, widgets, alerts, etc - which require new messages but it puts the responsibility on us to manage translations, since translations now have to be tracked by Git.
I'm not sure how much easier translations would be with a Database one or if that is even possible... but it seems like pushing this issue to git seems like it creates an unnecessary problem. It seems like having an easy way to export and import translations via the Database would be the easiest thing.
I'm a sole developer so it's not that bad, but every time my boss needs to make production specific changes to different servers running the same app... it's like you missed this translation, you missed that translation, etc.
On top of that with Docker, deployments don't even preserve changes made by users to those translation files. So now we have mutability in the file system -
So I'm just wondering if I'm missing something, how others solve this problem, how Laravel intended this problem to be addressed. I know there are libraries that handle localization for models - but not so much for features and structural parts of the app.
https://redd.it/1m2esah
@r_php
Hi,
I've been programming Laravel for 5 years - I program a bilingual app, but I'm in America and our customers are in France -
I'm still learning a lot, but one thing that has been a nightmare for our project is translations -
Right now, we have a Caffeinated based module system, with a Lang folder for each module, along with en and fr for translations. I know that Caffeinated is outdated, but Nwidart apparently has a similar problem -
Apparently in Laravel, translations are taken from files by default, and there is no out of the box system for managing localization in the Database. Maybe I missed something... but when I use trans or __(), it seems like it is directly going to the file system.
This means that translations have now become a part of the source code... which I guess it makes sense, because it's the developers who come with new ideas for views, widgets, alerts, etc - which require new messages but it puts the responsibility on us to manage translations, since translations now have to be tracked by Git.
I'm not sure how much easier translations would be with a Database one or if that is even possible... but it seems like pushing this issue to git seems like it creates an unnecessary problem. It seems like having an easy way to export and import translations via the Database would be the easiest thing.
I'm a sole developer so it's not that bad, but every time my boss needs to make production specific changes to different servers running the same app... it's like you missed this translation, you missed that translation, etc.
On top of that with Docker, deployments don't even preserve changes made by users to those translation files. So now we have mutability in the file system -
So I'm just wondering if I'm missing something, how others solve this problem, how Laravel intended this problem to be addressed. I know there are libraries that handle localization for models - but not so much for features and structural parts of the app.
https://redd.it/1m2esah
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community