This repository was archived by the owner on Feb 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of laravel-stubs package.
4+ *
5+ * @author ATehnix <atehnix@gmail.com>
6+ *
7+ * For the full copyright and license information, please view the LICENSE
8+ * file that was distributed with this source code.
9+ */
10+
11+ namespace ATehnix \LaravelStubs \Console ;
12+
13+ use Illuminate \Foundation \Console \ChannelMakeCommand as BaseChannelMakeCommand ;
14+
15+ class ChannelMakeCommand extends BaseChannelMakeCommand
16+ {
17+ /**
18+ * Get the stub file for the generator.
19+ *
20+ * @return string
21+ */
22+ protected function getStub ()
23+ {
24+ $ stub = config ('stubs.path ' ) . '/channel.stub ' ;
25+
26+ return file_exists ($ stub ) ? $ stub : parent ::getStub ();
27+ }
28+
29+ /**
30+ * Get the default namespace for the class.
31+ *
32+ * @param string $rootNamespace
33+ * @return string
34+ */
35+ protected function getDefaultNamespace ($ rootNamespace )
36+ {
37+ return $ rootNamespace . config ('stubs.namespaces.channel ' );
38+ }
39+ }
Original file line number Diff line number Diff line change 1010
1111namespace ATehnix \LaravelStubs \Providers ;
1212
13+ use ATehnix \LaravelStubs \Console \ChannelMakeCommand ;
1314use ATehnix \LaravelStubs \Console \ConsoleMakeCommand ;
1415use ATehnix \LaravelStubs \Console \ControllerMakeCommand ;
1516use ATehnix \LaravelStubs \Console \EventMakeCommand ;
@@ -43,6 +44,18 @@ public function boot()
4344 $ this ->commands (StubsPublishCommand::class);
4445 }
4546
47+ /**
48+ * Register the command.
49+ *
50+ * @return void
51+ */
52+ protected function registerChannelMakeCommand ()
53+ {
54+ $ this ->app ->singleton ('command.channel.make ' , function ($ app ) {
55+ return new ChannelMakeCommand ($ app ['files ' ]);
56+ });
57+ }
58+
4659 /**
4760 * Register the command.
4861 *
You can’t perform that action at this time.
0 commit comments