File tree 3 files changed +34
-16
lines changed
src/Illuminate/Foundation
3 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,22 @@ class ChannelMakeCommand extends GeneratorCommand
25
25
*
26
26
* @var string
27
27
*/
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
+ }
29
44
30
45
/**
31
46
* Get the stub file for the generator.
Original file line number Diff line number Diff line change 2
2
3
3
namespace DummyNamespace;
4
4
5
+ use NamespacedDummyUserModel;
6
+
5
7
class DummyClass
6
8
{
7
9
/**
8
- * Create a new broadcasting channel instance.
10
+ * Create a new channel instance.
9
11
*
10
12
* @return void
11
13
*/
@@ -17,9 +19,10 @@ class DummyClass
17
19
/**
18
20
* Authenticates the channel.
19
21
*
20
- * @return mixed
22
+ * @param \NamespacedDummyUserModel $user
23
+ * @return array|bool
21
24
*/
22
- public function join()
25
+ public function join(DummyUser $user )
23
26
{
24
27
//
25
28
}
Original file line number Diff line number Diff line change @@ -244,6 +244,18 @@ protected function registerCacheTableCommand()
244
244
});
245
245
}
246
246
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
+
247
259
/**
248
260
* Register the command.
249
261
*
@@ -400,18 +412,6 @@ protected function registerJobMakeCommand()
400
412
});
401
413
}
402
414
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
-
415
415
/**
416
416
* Register the command.
417
417
*
You can’t perform that action at this time.
0 commit comments