There's no denying that the "Action Pattern" in the Laravel ecosystem is extremely useful and widely used. However, action classes require "too much content" to do basic things. Let's review a basic action class:
namespace App\Actions;
use App\Models\User;
class CreateUser
{
public function handle(array $data): User
{
return User::create($data);
}
}
We have a namespace, class, method... All of this to create a user? It's overkill for such a simple task, isn't it?
For this reason, the Fraction solution is revolutionary in the context of Actions. Fraction allows you to write actions in a simpler and more direct way, without the need for all this structure, similar to what PestPHP proposes.
Now that I've made you curious about what Fraction does 😉 check out the official website by clicking here. There you'll find a complete explanation of the package, as well as understanding what it really offers along with its many benefits.