File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace Steein \Robots \Laravel ;
3
+
4
+ use Illuminate \Support \Facades \Facade ;
5
+
6
+ class RobotsFacade extends Facade
7
+ {
8
+ /**
9
+ * Get the registered name of the component.
10
+ *
11
+ * @return string
12
+ */
13
+ protected static function getFacadeAccessor () { return 'robots ' ; }
14
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace Steein \Robots \Laravel ;
3
+
4
+ use Illuminate \Support \ServiceProvider ;
5
+ use Steein \Robots \Robots ;
6
+
7
+ class RobotsServiceProvider extends ServiceProvider
8
+ {
9
+ /**
10
+ * Indicates if loading of the provider is deferred.
11
+ *
12
+ * @var bool
13
+ */
14
+ protected $ defer = false ;
15
+
16
+ /**
17
+ * Bootstrap the application events.
18
+ *
19
+ * @return void
20
+ */
21
+ public function boot ()
22
+ {
23
+ $ this ->package ('steein/robots ' );
24
+ }
25
+
26
+ /**
27
+ * Register the service provider.
28
+ *
29
+ * @return void
30
+ */
31
+ public function register ()
32
+ {
33
+ $ this ->app ['robots ' ] = $ this ->app ->share (function ($ app )
34
+ {
35
+ return new Robots ();
36
+ });
37
+
38
+ $ this ->app ->booting (function ()
39
+ {
40
+ $ loader = \Illuminate \Foundation \AliasLoader::getInstance ();
41
+ $ loader ->alias ('Robots ' , 'Steein\Robots\Laravel\RobotsFacade ' );
42
+ });
43
+ }
44
+
45
+ }
You can’t perform that action at this time.
0 commit comments