File tree Expand file tree Collapse file tree
src/Illuminate/Foundation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,22 @@ class ChannelMakeCommand extends GeneratorCommand
2525 *
2626 * @var string
2727 */
28- protected $ type = 'Broadcasting Channel ' ;
28+ protected $ type = 'Channel ' ;
29+
30+ /**
31+ * Build the class with the given name.
32+ *
33+ * @param string $name
34+ * @return string
35+ */
36+ protected function buildClass ($ name )
37+ {
38+ return str_replace (
39+ 'DummyUser ' ,
40+ class_basename (config ('auth.providers.users.model ' )),
41+ parent ::buildClass ($ name )
42+ );
43+ }
2944
3045 /**
3146 * Get the stub file for the generator.
Original file line number Diff line number Diff line change 22
33namespace DummyNamespace;
44
5+ use NamespacedDummyUserModel;
6+
57class DummyClass
68{
79 /**
8- * Create a new broadcasting channel instance.
10+ * Create a new channel instance.
911 *
1012 * @return void
1113 */
@@ -17,9 +19,10 @@ class DummyClass
1719 /**
1820 * Authenticates the channel.
1921 *
20- * @return mixed
22+ * @param \NamespacedDummyUserModel $user
23+ * @return array|bool
2124 */
22- public function join()
25+ public function join(DummyUser $user )
2326 {
2427 //
2528 }
Original file line number Diff line number Diff line change @@ -244,6 +244,18 @@ protected function registerCacheTableCommand()
244244 });
245245 }
246246
247+ /**
248+ * Register the command.
249+ *
250+ * @return void
251+ */
252+ protected function registerChannelMakeCommand ()
253+ {
254+ $ this ->app ->singleton ('command.channel.make ' , function ($ app ) {
255+ return new ChannelMakeCommand ($ app ['files ' ]);
256+ });
257+ }
258+
247259 /**
248260 * Register the command.
249261 *
@@ -400,18 +412,6 @@ protected function registerJobMakeCommand()
400412 });
401413 }
402414
403- /**
404- * Register the command.
405- *
406- * @return void
407- */
408- protected function registerChannelMakeCommand ()
409- {
410- $ this ->app ->singleton ('command.channel.make ' , function ($ app ) {
411- return new ChannelMakeCommand ($ app ['files ' ]);
412- });
413- }
414-
415415 /**
416416 * Register the command.
417417 *
You can’t perform that action at this time.
0 commit comments