feat: initial commit
This commit is contained in:
23
app/Processes/BaseProcess.php
Normal file
23
app/Processes/BaseProcess.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Processes;
|
||||
|
||||
use Illuminate\Support\Facades\Pipeline;
|
||||
|
||||
abstract class BaseProcess
|
||||
{
|
||||
/**
|
||||
* @var array<class-string>
|
||||
*
|
||||
*/
|
||||
protected array $tasks = [];
|
||||
|
||||
public function run(mixed $payload): mixed
|
||||
{
|
||||
return Pipeline::send(
|
||||
passable: $payload,
|
||||
)->through(
|
||||
pipes: $this->tasks,
|
||||
)->thenReturn();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user