@@ -26,11 +26,6 @@ class ConnectorServiceProvider extends ServiceProvider
26
26
*/
27
27
public function boot ()
28
28
{
29
-
30
- if ((!isset ($ _SESSION ) || empty ($ _SESSION )) && !in_array (env ('APP_ENV ' ), array ('testing ' , 'test ' )) ){
31
- session_start (); //Editora Admin Session
32
- }
33
-
34
29
//Publicamos el archivo de configuración
35
30
$ this ->publishes ([
36
31
__DIR__ .'/Configuration.php ' => config_path ('editora.php ' ),
@@ -76,36 +71,39 @@ public function boot()
76
71
public function register ()
77
72
{
78
73
$ this ->mergeConfigFrom (
79
- __DIR__ .'/Configuration.php ' , 'editora '
74
+ __DIR__ .'/Configuration.php ' ,
75
+ 'editora '
80
76
);
81
77
82
78
/* $db = [
83
- 'dbname' => env('DB_DATABASE'),
84
- 'user' => env('DB_USERNAME'),
85
- 'password' => env('DB_PASSWORD'),
86
- 'host' => env('DB_HOST'),
87
- 'driver' => 'pdo_mysql',
88
- 'charset' => 'utf8'
89
- ];
79
+ 'dbname' => env('DB_DATABASE'),
80
+ 'user' => env('DB_USERNAME'),
81
+ 'password' => env('DB_PASSWORD'),
82
+ 'host' => env('DB_HOST'),
83
+ 'driver' => 'pdo_mysql',
84
+ 'charset' => 'utf8'
85
+ ];
90
86
*/
91
- $ db =DB ::connection ()->getDoctrineConnection ();
92
- $ this ->app ->bind ('Extractor ' , function () use ($ db ) {
87
+ $ db =DB ::connection ()->getDoctrineConnection ();
88
+ $ this ->app ->bind ('Extractor ' , function () use ($ db ) {
93
89
return new Extractor ($ db );
94
90
});
95
91
96
- $ this ->app ->bind ('Utils ' , function () use ($ db ) {
92
+ $ this ->app ->bind ('Utils ' , function () use ($ db ) {
97
93
return new Utils ($ db );
98
94
});
99
-
100
- $ this ->app ->bind ('Loader ' , function () use ($ db ) {
101
- return new Loader ($ db );
102
- });
95
+
96
+ $ this ->app ->bind ('Loader ' , function () use ($ db ) {
97
+ return new Loader ($ db );
98
+ });
103
99
104
100
$ laravelVersion = explode ('. ' , $ this ->app ->version ());
105
101
$ laravelRelease = (int ) $ laravelVersion [1 ];
106
102
107
103
$ middlewareMethod = "middleware " ;
108
- if ($ laravelRelease >= 4 ) $ middlewareMethod = "aliasMiddleware " ;
104
+ if ($ laravelRelease >= 4 ) {
105
+ $ middlewareMethod = "aliasMiddleware " ;
106
+ }
109
107
110
108
$ this ->app ['router ' ]->$ middlewareMethod ('setLocale ' , 'Omatech\Editora\Connector\Middlewares\SetLocaleMiddleware ' );
111
109
@@ -120,14 +118,11 @@ public function register()
120
118
public function registerHelpers ()
121
119
{
122
120
// Load the helpers in app/Http/helpers.php
123
- if (file_exists ($ file = __DIR__ .'/Helper/EditoraHelper.php ' ))
124
- {
121
+ if (file_exists ($ file = __DIR__ .'/Helper/EditoraHelper.php ' )) {
125
122
require $ file ;
126
123
}
127
- if (file_exists ($ file = __DIR__ .'/Helper/StaticTextHelper.php ' ))
128
- {
124
+ if (file_exists ($ file = __DIR__ .'/Helper/StaticTextHelper.php ' )) {
129
125
require $ file ;
130
126
}
131
127
}
132
-
133
128
}
0 commit comments