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/1mzim12
@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/1mzim12
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
🚀 [Release] Free & Enhanced Fork of inertiajs-tables-laravel-query-builder
Hey everyone 👋,
I recently forked the `inertiajs-tables-laravel-query-builder` package by Pascal Baljet. As some of you may know, the original project has been discontinued in favor of a paid version.
Rather than letting it fade away, I decided to maintain it and extend it with several new features.
# ✨ What’s New in my fork
* **Fluent API**: brand-new, intuitive API for configuring tables ✅
* **CSV Export**: export filtered data straight to CSV ✅
* **Custom Export Callbacks**: easily hook into the export process (Excel, JSON, XML, or any custom format) ✅
* **Number Filters**: advanced numeric filtering with multiple comparison operators ✅
* **Column Filters**: filter icons directly in column headers for quick access ✅
* **Resizable Columns**: drag to resize table columns ✅
* **Customizable Header & Cell Classes**: apply custom classes per column header or cell for styling flexibility ✅
# ✅ Still Included (from the original)
* Auto-fill (`thead`/`tbody` auto-generation with custom cell support)
* Global search & per-field search
* Select filters
* Toggle columns
* Column sorting
* Pagination (Eloquent / API Resource / Simple / Cursor)
* Multiple tables in a single view
* Automatic query string updates (via Inertia replace)
So everything that made the original package great is still there — but now extended with a more modern and flexible API, plus export support and new customization options.
👉 [https://github.com/adesin-fr/inertiajs-tables-laravel-query-builder/](https://github.com/adesin-fr/inertiajs-tables-laravel-query-builder/)
Would love feedback, issues, or PRs from the community 🙌
https://redd.it/1mzjyxr
@r_php
Hey everyone 👋,
I recently forked the `inertiajs-tables-laravel-query-builder` package by Pascal Baljet. As some of you may know, the original project has been discontinued in favor of a paid version.
Rather than letting it fade away, I decided to maintain it and extend it with several new features.
# ✨ What’s New in my fork
* **Fluent API**: brand-new, intuitive API for configuring tables ✅
* **CSV Export**: export filtered data straight to CSV ✅
* **Custom Export Callbacks**: easily hook into the export process (Excel, JSON, XML, or any custom format) ✅
* **Number Filters**: advanced numeric filtering with multiple comparison operators ✅
* **Column Filters**: filter icons directly in column headers for quick access ✅
* **Resizable Columns**: drag to resize table columns ✅
* **Customizable Header & Cell Classes**: apply custom classes per column header or cell for styling flexibility ✅
# ✅ Still Included (from the original)
* Auto-fill (`thead`/`tbody` auto-generation with custom cell support)
* Global search & per-field search
* Select filters
* Toggle columns
* Column sorting
* Pagination (Eloquent / API Resource / Simple / Cursor)
* Multiple tables in a single view
* Automatic query string updates (via Inertia replace)
So everything that made the original package great is still there — but now extended with a more modern and flexible API, plus export support and new customization options.
👉 [https://github.com/adesin-fr/inertiajs-tables-laravel-query-builder/](https://github.com/adesin-fr/inertiajs-tables-laravel-query-builder/)
Would love feedback, issues, or PRs from the community 🙌
https://redd.it/1mzjyxr
@r_php
GitHub
GitHub - Adesin-fr/inertiajs-tables-laravel-query-builder: Inertia.js Tables for Laravel Query Builder
Inertia.js Tables for Laravel Query Builder. Contribute to Adesin-fr/inertiajs-tables-laravel-query-builder development by creating an account on GitHub.
Bootstrap Modern PHP Applications with ConfigProvider
What do you guys think?
Is the ConfigProvider approach the best there is or do you prefer its alternatives?
What do you think ConfigProvider is lacking compared with the alternatives?
https://www.dotkernel.com/architecture/configprovider-bootstrap-modern-php-applications/
https://redd.it/1mzl8vu
@r_php
What do you guys think?
Is the ConfigProvider approach the best there is or do you prefer its alternatives?
What do you think ConfigProvider is lacking compared with the alternatives?
https://www.dotkernel.com/architecture/configprovider-bootstrap-modern-php-applications/
https://redd.it/1mzl8vu
@r_php
Dotkernel | Headless Platform for modern web applications
ConfigProvider - Bootstrap Modern PHP Applications
In PHP, the ConfigProvider is a class that is part of an application's bootstrap process. It's a class or callable that returns configuration data telling the platform which middleware should run, in what order, and sometimes under what conditions.
If…
If…
Is PHP Finally Shedding Its “Legacy” Label in 2025?
For years, PHP has carried the “old and messy” reputation compared to modern languages like Node.js, Go, or Python. But with PHP 8+ introducing JIT, Fibers, attributes, union types, and significant performance boosts, many developers are starting to see it in a new light.
Big players like WordPress, Drupal, and Laravel still power massive portions of the web, and new frameworks are pushing PHP into areas beyond traditional CMS use. Some benchmarks even show PHP 8.3 competing closely with Node in performance-heavy workloads.
Do you think PHP has finally shaken off its “legacy” stigma? Or will the perception always linger, no matter how much the language evolves?
https://redd.it/1mzmqxj
@r_php
For years, PHP has carried the “old and messy” reputation compared to modern languages like Node.js, Go, or Python. But with PHP 8+ introducing JIT, Fibers, attributes, union types, and significant performance boosts, many developers are starting to see it in a new light.
Big players like WordPress, Drupal, and Laravel still power massive portions of the web, and new frameworks are pushing PHP into areas beyond traditional CMS use. Some benchmarks even show PHP 8.3 competing closely with Node in performance-heavy workloads.
Do you think PHP has finally shaken off its “legacy” stigma? Or will the perception always linger, no matter how much the language evolves?
https://redd.it/1mzmqxj
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
How I can inject extra logic queries on doctrine's schema:update
I want once I run:
Once an SQL query is generated, before printing it to generate extra SQL based on the already generated SQL. I am a situation in which the team work upon does not use db migrations (reasons uknown, no time to explain why)
I am into a situation in which I introduce upon entity a new column that is not null and unique:
I originally have this entity
And the underlying table has already soem records:
id | name
--- | ---
1 | hello
2 | value
And I want to introduce a unique not null column named token:
But this need to be populated with a unique value before
Furthermore ci/cd pipeline that deploys it runs this command that updates the db:
Therefore I want this procedure to be automated. How can this be done? Is there a way to inject logic on
https://redd.it/1mzump4
@r_php
I want once I run:
php bin/console list doctrine:schema:update
Once an SQL query is generated, before printing it to generate extra SQL based on the already generated SQL. I am a situation in which the team work upon does not use db migrations (reasons uknown, no time to explain why)
I am into a situation in which I introduce upon entity a new column that is not null and unique:
I originally have this entity
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity]
class Coupon
{
public const PREFIX = 'cou';
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: true)]
private $name;
public function __construct()
{
}
}
And the underlying table has already soem records:
id | name
--- | ---
1 | hello
2 | value
And I want to introduce a unique not null column named token:
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity]
class Coupon
{
public const PREFIX = 'cou';
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', length: 255, unique: true)]
private string $token;
#[ORM\Column(type: 'string', nullable: true)]
private $name;
public function __construct()
{
}
}
But this need to be populated with a unique value before
doctrine:schema:update generates the inique index. Furthermore ci/cd pipeline that deploys it runs this command that updates the db:
php bin/console list doctrine:schema:update
Therefore I want this procedure to be automated. How can this be done? Is there a way to inject logic on
doctrine:schema:update that generate extra sql on situations like this one?https://redd.it/1mzump4
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
How to use purely migrations for db setup on existing pre-populated dbs?
Currently I am using schema:update in order to setup the DB. I want to properly introduce the migrations and use only them for Db setup.
As a solution I thought to squash the migrations like this:
On Prod squash migrations, mark existing as skipped
Merge on staging and do a diff, mark both prod and staging ask skipped
On dev do the same
So I end up with 3 migrations:
One containing the initial prod changed (being the oldest ones)
Then one with staging
And one with dev changes
But is this a reccomended approachs what are the downsides?
https://redd.it/1mzzhan
@r_php
Currently I am using schema:update in order to setup the DB. I want to properly introduce the migrations and use only them for Db setup.
As a solution I thought to squash the migrations like this:
On Prod squash migrations, mark existing as skipped
Merge on staging and do a diff, mark both prod and staging ask skipped
On dev do the same
So I end up with 3 migrations:
One containing the initial prod changed (being the oldest ones)
Then one with staging
And one with dev changes
But is this a reccomended approachs what are the downsides?
https://redd.it/1mzzhan
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
How to implement an APIPlatform filter that doesn't work with doctrine?
Hi,
I have an RRule (recurrence rule) field and want to add a between filter for it. Doctrine/Postgress don't support rrules so the general strategy is fetch all entries -> parse the rrule text field and check the occurences are inbetween the dates. But from the docs an API Filter just modifies the querybuilder but what I need is to filter the endresult after the data is already fetched from the db before it is send to the user.
How can this be done?
https://redd.it/1mzz2zo
@r_php
Hi,
I have an RRule (recurrence rule) field and want to add a between filter for it. Doctrine/Postgress don't support rrules so the general strategy is fetch all entries -> parse the rrule text field and check the occurences are inbetween the dates. But from the docs an API Filter just modifies the querybuilder but what I need is to filter the endresult after the data is already fetched from the db before it is send to the user.
How can this be done?
https://redd.it/1mzz2zo
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Building Workflows in PHP
https://blog.ecotone.tech/building-workflows-in-php
https://redd.it/1n00rdb
@r_php
https://blog.ecotone.tech/building-workflows-in-php
https://redd.it/1n00rdb
@r_php
Ecotone Framework - Resilient and scalable PHP Systems
Building Workflows in PHP
Almost any business requires workflows. Whether you're processing orders, onboarding customers, or handling document approvals, these processes are the beating heart of your application. Yet for most PHP developers, workflows become sources of frustration…
MVC Controllers: plural or singular?
Across MVC frameworks (e.g., CodeIgniter 4, Laravel, ...), what’s the common convention for controller names—plural (Users) or singular (User)? Why do you prefer it?
I like more singular cf. models. This survey seems to support this: https://www.reddit.com/r/laravel/s/K9qpqZFfQX
I never questioned this until my AI coding agent started using plurals and I thought to myself, wait a minute.
View Poll
https://redd.it/1n06rl1
@r_php
Across MVC frameworks (e.g., CodeIgniter 4, Laravel, ...), what’s the common convention for controller names—plural (Users) or singular (User)? Why do you prefer it?
I like more singular cf. models. This survey seems to support this: https://www.reddit.com/r/laravel/s/K9qpqZFfQX
I never questioned this until my AI coding agent started using plurals and I thought to myself, wait a minute.
View Poll
https://redd.it/1n06rl1
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
What CMS do you use?
I am curious to learn what CMS you use when you are building a content-heavy website? I have some experience with Symfony through Shopware 6 for work and a personal project (implementation of a third party API), but I have yet to build a website from scratch with it. I tried Sulu (its upcoming version 3 looks promising) and EasyAdmin. I like the latter since it integrates with your own entities, but I also tried Filament for Laravel, which is similar but miles ahead.
What do you use when the project requires one? Something custom? Or perhaps something not based on Symfony, when there's a lot of content to be edited?
https://redd.it/1n0f8du
@r_php
I am curious to learn what CMS you use when you are building a content-heavy website? I have some experience with Symfony through Shopware 6 for work and a personal project (implementation of a third party API), but I have yet to build a website from scratch with it. I tried Sulu (its upcoming version 3 looks promising) and EasyAdmin. I like the latter since it integrates with your own entities, but I also tried Filament for Laravel, which is similar but miles ahead.
What do you use when the project requires one? Something custom? Or perhaps something not based on Symfony, when there's a lot of content to be edited?
https://redd.it/1n0f8du
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Configuring Laravel Boost MCP with GitHub Copilot in PHPStorm for DDEV on Windows WSL
Hey r/laravel,
Running Laravel 12 on DDEV in a Windows WSL/Mac setup, I had trouble with Laravel Boost's MCP server not connecting properly. I Googled for a bit and didn't find many resources on it, so I wanted to share my solution—it might assist some of you. Have a great day!
for Mac/Linux;
For Windows with WSL
https://redd.it/1n0gz1g
@r_php
Hey r/laravel,
Running Laravel 12 on DDEV in a Windows WSL/Mac setup, I had trouble with Laravel Boost's MCP server not connecting properly. I Googled for a bit and didn't find many resources on it, so I wanted to share my solution—it might assist some of you. Have a great day!
for Mac/Linux;
{
"servers": {
"my-laravel-project": {
"type": "stdio",
"command": "ddev",
"args": [
"exec",
"php",
"artisan",
"boost:mcp"
]
}
}
}
For Windows with WSL
{
"servers": {
"my-laravel-project": {
"type": "stdio",
"command": "wsl.exe",
"args": [
"-d",
"Ubuntu",
"--cd",
"/path/to/my-laravel-project",
"ddev",
"exec",
"php",
"artisan",
"boost:mcp"
]
}
}
}
https://redd.it/1n0gz1g
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Taylor Otwell: What 14 Years of Laravel Taught Me About Maintainability
https://maintainable.fm/episodes/taylor-otwell-what-14-years-of-laravel-taught-me-about-maintainability
https://redd.it/1n0koi1
@r_php
https://maintainable.fm/episodes/taylor-otwell-what-14-years-of-laravel-taught-me-about-maintainability
https://redd.it/1n0koi1
@r_php
Maintainable Software Podcast
Taylor Otwell: What 14 Years of Laravel Taught Me About Maintainability
Taylor Otwell looks back on 14 years of building and maintaining Laravel. From four stars on GitHub to a full-fledged ecosystem, he shares what it takes to design software that lasts—and why simple often wins.
How to Build a Reasoning AI Agent with LarAgent
https://blog.laragent.ai/how-to-build-a-reasoning-ai-agent-with-laragent/
https://redd.it/1n0mbao
@r_php
https://blog.laragent.ai/how-to-build-a-reasoning-ai-agent-with-laragent/
https://redd.it/1n0mbao
@r_php
LarAgent
How to Build a Reasoning AI Agent with LarAgent
Running AI models on your own laptop or even a phone sounds fun, right? 😊 In this guide, we’ll explore how to make a small and simple model a bit smarter by turning it into a reasoning agent using LarAgent in Laravel.
If you prefer to watch instead of reading…
If you prefer to watch instead of reading…
🚀 Just released: Laravel Fast2SMS package – OTPs, DLT & Quick SMS made simple
Hey folks,
I built a Laravel package that makes sending SMS through Fast2SMS API way easier.
If you’ve ever dealt with raw SMS APIs, you know the pain — long payloads, DLT templates, sender IDs, juggling queues, etc. So I wrapped it all in a Laravel-fluent API that feels natural to work with.
# ✨ Features at a glance
Quick SMS
OTP support (super easy)
DLT template messages
Queue & scheduling support
Wallet balance check
Laravel Notifications integration
# ⚡ Code example (it’s really this simple)
Fast2sms::otp('9999999999', '123456');
Or with a DLT template:
Fast2sms::dlt('9999999999', 'TEMPLATEID', ['John Doe'], 'SENDERID');
# 📦 Repo
👉 https://github.com/itxshakil/laravel-fast2sms
I’d love feedback, issues, or ideas for new features. And if you find it useful, a ⭐ on GitHub would mean a lot 🙂
https://redd.it/1n0u66a
@r_php
Hey folks,
I built a Laravel package that makes sending SMS through Fast2SMS API way easier.
If you’ve ever dealt with raw SMS APIs, you know the pain — long payloads, DLT templates, sender IDs, juggling queues, etc. So I wrapped it all in a Laravel-fluent API that feels natural to work with.
# ✨ Features at a glance
Quick SMS
OTP support (super easy)
DLT template messages
Queue & scheduling support
Wallet balance check
Laravel Notifications integration
# ⚡ Code example (it’s really this simple)
Fast2sms::otp('9999999999', '123456');
Or with a DLT template:
Fast2sms::dlt('9999999999', 'TEMPLATEID', ['John Doe'], 'SENDERID');
# 📦 Repo
👉 https://github.com/itxshakil/laravel-fast2sms
I’d love feedback, issues, or ideas for new features. And if you find it useful, a ⭐ on GitHub would mean a lot 🙂
https://redd.it/1n0u66a
@r_php
GitHub
GitHub - itxshakil/laravel-fast2sms: A robust and simple-to-use Laravel package for sending SMS messages via the Fast2sms API.…
A robust and simple-to-use Laravel package for sending SMS messages via the Fast2sms API. This package offers a powerful, fluent interface that simplifies sending different types of SMS, including ...
🚀 Just released: Laravel Fast2SMS package – OTPs, DLT & Quick SMS made simple
Hey folks,
I built a Laravel package that makes sending SMS through Fast2SMS API way easier.
If you’ve ever dealt with raw SMS APIs, you know the pain — long payloads, DLT templates, sender IDs, juggling queues, etc. So I wrapped it all in a Laravel-fluent API that feels natural to work with.
# ✨ Features at a glance
Quick SMS
OTP support (super easy)
DLT template messages
Queue & scheduling support
Wallet balance check
Laravel Notifications integration
# ⚡ Code example (it’s really this simple)
Fast2sms::otp('9999999999', '123456');
Or with a DLT template:
Fast2sms::dlt('9999999999', 'TEMPLATEID', ['John Doe'], 'SENDERID');
# 📦 Repo
👉 https://github.com/itxshakil/laravel-fast2sms
I’d love feedback, issues, or ideas for new features. And if you find it useful, a ⭐ on GitHub would mean a lot 🙂
https://redd.it/1n0u75l
@r_php
Hey folks,
I built a Laravel package that makes sending SMS through Fast2SMS API way easier.
If you’ve ever dealt with raw SMS APIs, you know the pain — long payloads, DLT templates, sender IDs, juggling queues, etc. So I wrapped it all in a Laravel-fluent API that feels natural to work with.
# ✨ Features at a glance
Quick SMS
OTP support (super easy)
DLT template messages
Queue & scheduling support
Wallet balance check
Laravel Notifications integration
# ⚡ Code example (it’s really this simple)
Fast2sms::otp('9999999999', '123456');
Or with a DLT template:
Fast2sms::dlt('9999999999', 'TEMPLATEID', ['John Doe'], 'SENDERID');
# 📦 Repo
👉 https://github.com/itxshakil/laravel-fast2sms
I’d love feedback, issues, or ideas for new features. And if you find it useful, a ⭐ on GitHub would mean a lot 🙂
https://redd.it/1n0u75l
@r_php
GitHub
GitHub - itxshakil/laravel-fast2sms: A robust and simple-to-use Laravel package for sending SMS messages via the Fast2sms API.…
A robust and simple-to-use Laravel package for sending SMS messages via the Fast2sms API. This package offers a powerful, fluent interface that simplifies sending different types of SMS, including ...
Taylor Otwell: What 14 Years of Laravel Taught Me About Maintainability
https://maintainable.fm/episodes/taylor-otwell-what-14-years-of-laravel-taught-me-about-maintainability
https://redd.it/1n0wmh6
@r_php
https://maintainable.fm/episodes/taylor-otwell-what-14-years-of-laravel-taught-me-about-maintainability
https://redd.it/1n0wmh6
@r_php
Maintainable Software Podcast
Taylor Otwell: What 14 Years of Laravel Taught Me About Maintainability
Taylor Otwell looks back on 14 years of building and maintaining Laravel. From four stars on GitHub to a full-fledged ecosystem, he shares what it takes to design software that lasts—and why simple often wins.
Anyone using ADR + AAA tests in PHP/Symfony ?
# ADR + AAA in Symfony
I’ve been experimenting with an ADR (Action–Domain–Response) + AAA pattern in Symfony, and I’m curious if anyone else is using this in production, and what your thoughts are.
The idea is pretty straightforward:
- **Action** = a super thin controller that only maps input, calls a handler, and returns a JsonResponse.
- **Domain** = a handler with a single `__invoke()` method, returning a pure domain object (like `OrderResult`). No JSON, no HTTP, just business logic.
- **Response** = the controller transforms the DTO into JSON with the right HTTP code.
This way, unit tests are written in a clean AAA style (Arrange–Act–Assert) directly on the output object, without parsing JSON or booting the full kernel.
---
## Short example
```php
final class OrderResult {
public function __construct(
public readonly bool $success,
public readonly string $message = '',
public readonly ?array $data = null,
) {}
}
final class CreateOrderHandler {
public function __construct(private readonly OrderRepository $orders) {}
public function __invoke(OrderInput $in): OrderResult {
if ($this->orders->exists($in->orderId)) return new OrderResult(false, 'exists');
$this->orders->create($in->orderId, $in->customerId, $in->amountCents);
return new OrderResult(true, '');
}
}
#[Route('/api/v1/orders', methods: ['POST'])]
public function __invoke(OrderInput $in, CreateOrderHandler $h): JsonResponse {
$r = $h($in);
return new JsonResponse($r, $r->success ? 200 : 400);
}
````
And the test (AAA):
```php
public function test_creates_when_not_exists(): void {
$repo = $this->createMock(OrderRepository::class);
$repo->method('exists')->willReturn(false);
$repo->expects($this->once())->method('create');
$res = (new CreateOrderHandler($repo))(new OrderInput('o1','c1',2500));
$this->assertTrue($res->success);
}
```
---
## What I like about this approach
* Controllers are ridiculously simple.
* Handlers are super easy to test (one input → one output).
* The same handler can be reused for REST, CLI, async jobs, etc.
---
Open to any feedback — success stories, horror stories, or alternatives you prefer.
https://redd.it/1n0y29b
@r_php
# ADR + AAA in Symfony
I’ve been experimenting with an ADR (Action–Domain–Response) + AAA pattern in Symfony, and I’m curious if anyone else is using this in production, and what your thoughts are.
The idea is pretty straightforward:
- **Action** = a super thin controller that only maps input, calls a handler, and returns a JsonResponse.
- **Domain** = a handler with a single `__invoke()` method, returning a pure domain object (like `OrderResult`). No JSON, no HTTP, just business logic.
- **Response** = the controller transforms the DTO into JSON with the right HTTP code.
This way, unit tests are written in a clean AAA style (Arrange–Act–Assert) directly on the output object, without parsing JSON or booting the full kernel.
---
## Short example
```php
final class OrderResult {
public function __construct(
public readonly bool $success,
public readonly string $message = '',
public readonly ?array $data = null,
) {}
}
final class CreateOrderHandler {
public function __construct(private readonly OrderRepository $orders) {}
public function __invoke(OrderInput $in): OrderResult {
if ($this->orders->exists($in->orderId)) return new OrderResult(false, 'exists');
$this->orders->create($in->orderId, $in->customerId, $in->amountCents);
return new OrderResult(true, '');
}
}
#[Route('/api/v1/orders', methods: ['POST'])]
public function __invoke(OrderInput $in, CreateOrderHandler $h): JsonResponse {
$r = $h($in);
return new JsonResponse($r, $r->success ? 200 : 400);
}
````
And the test (AAA):
```php
public function test_creates_when_not_exists(): void {
$repo = $this->createMock(OrderRepository::class);
$repo->method('exists')->willReturn(false);
$repo->expects($this->once())->method('create');
$res = (new CreateOrderHandler($repo))(new OrderInput('o1','c1',2500));
$this->assertTrue($res->success);
}
```
---
## What I like about this approach
* Controllers are ridiculously simple.
* Handlers are super easy to test (one input → one output).
* The same handler can be reused for REST, CLI, async jobs, etc.
---
Open to any feedback — success stories, horror stories, or alternatives you prefer.
https://redd.it/1n0y29b
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
A package to automatically listen to Paddle Webhooks in local development with Laravel Cashier
https://github.com/Einenlum/cashier-paddle-webhooks
https://redd.it/1n1a5q7
@r_php
https://github.com/Einenlum/cashier-paddle-webhooks
https://redd.it/1n1a5q7
@r_php
GitHub
GitHub - Einenlum/cashier-paddle-webhooks: A package to automatically listen to Paddle Webhooks in local development with Laravel…
A package to automatically listen to Paddle Webhooks in local development with Laravel Cashier - Einenlum/cashier-paddle-webhooks
Exploring our new PHP SDK, built using Saloon
https://ohdear.app/news-and-updates/exploring-our-new-php-sdk-built-using-saloon
https://redd.it/1n1bnda
@r_php
https://ohdear.app/news-and-updates/exploring-our-new-php-sdk-built-using-saloon
https://redd.it/1n1bnda
@r_php
ohdear.app
Exploring our new PHP SDK, built using Saloon
Today, we've launching a new PHP SDK package, which has been rebuilt from scratch using the wonderful Saloon library. Using our new SDK, you can easily use the entire Oh Dear API.