Skip to content

Commit 75d68b2

Browse files
added a custom command
1 parent 92b794e commit 75d68b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ChuckNorrisJokesServiceProvider.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
namespace Manojksrivastava\ChuckNorrisJokes;
33

44
use Illuminate\Support\ServiceProvider;
5+
use Manojksrivastava\ChuckNorrisJokes\Console\ChuckNorrisJoke;
56

67
class ChuckNorrisJokesServiceProvider extends ServiceProvider
78
{
89
public function boot()
910
{
10-
11+
if ($this->app->runningInConsole()) {
12+
$this->commands([
13+
ChuckNorrisJoke::class
14+
]);
15+
}
1116
}
1217
public function register()
1318
{

0 commit comments

Comments
 (0)