Skip to content

Commit 268fb05

Browse files
committed
feat: run a job in feature
1 parent 725c1c7 commit 268fb05

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Concepts/Feature.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22

33
namespace Bit\Skeleton\Concepts;
44

5+
use Illuminate\Support\Facades\App;
6+
57
abstract class Feature
68
{
7-
//
9+
/**
10+
* Run a job.
11+
*
12+
* @param string $job
13+
* @param mixed $args,...
14+
* @return void
15+
*/
16+
public function run($job, ...$args)
17+
{
18+
return App::call([new $job(...$args), 'handle']);
19+
}
820
}

0 commit comments

Comments
 (0)