File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public function register()
3131 $ this ->shareWithApp ();
3232 $ this ->loadConfig ();
3333 $ this ->registerViews ();
34+ $ this ->registerAliases ();
3435 }
3536
3637 /**
@@ -66,6 +67,31 @@ protected function registerViews()
6667 $ this ->app ['view ' ]->addNamespace ('chat ' , __DIR__ .'/../../../views ' );
6768 }
6869
70+ /**
71+ * Register aliases
72+ *
73+ * @return void
74+ */
75+ protected function registerAliases ()
76+ {
77+ $ aliases = [
78+ 'Chat ' => 'Syntax\Core\Chat ' ,
79+ 'Chat_Room ' => 'Syntax\Core\Chat_Room ' ,
80+ ];
81+
82+ $ appAliases = \Config::get ('core::nonCoreAliases ' );
83+
84+ foreach ($ aliases as $ alias => $ class ) {
85+ if (!is_null ($ appAliases )) {
86+ if (!in_array ($ alias , $ appAliases )) {
87+ \Illuminate \Foundation \AliasLoader::getInstance ()->alias ($ alias , $ class );
88+ }
89+ } else {
90+ \Illuminate \Foundation \AliasLoader::getInstance ()->alias ($ alias , $ class );
91+ }
92+ }
93+ }
94+
6995 /**
7096 * Get the services provided by the provider.
7197 *
You can’t perform that action at this time.
0 commit comments