@@ -48,11 +48,11 @@ class RedirectServiceProvider extends AddonServiceProvider
4848 ];
4949
5050 protected $ scripts = [
51- __DIR__ . '/../resources/dist/js/cp.js ' ,
51+ __DIR__ . '/../resources/dist/js/cp.js ' ,
5252 ];
5353
5454 protected $ routes = [
55- 'cp ' => __DIR__ . '/../routes/cp.php ' ,
55+ 'cp ' => __DIR__ . '/../routes/cp.php ' ,
5656 ];
5757
5858 protected $ listen = [
@@ -112,19 +112,19 @@ public function boot()
112112 ->bootPermissions ();
113113 });
114114
115- if (! $ this ->app ->runningInConsole ()) {
115+ if (!$ this ->app ->runningInConsole ()) {
116116 return ;
117117 }
118118
119119 $ this ->publishes ([
120120 __DIR__ . '/../database/migrations/create_redirect_error_tables.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_create_redirect_error_tables.php ' ),
121- __DIR__ . '/../database/migrations/increase_redirect_error_table_url_length.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_increase_redirect_error_table_url_length.php ' ),
121+ __DIR__ . '/../database/migrations/increase_redirect_error_table_url_length.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time () + 1 ) . '_increase_redirect_error_table_url_length.php ' ),
122122 ], 'statamic-redirect-error-migrations ' );
123123
124124 $ this ->publishes ([
125125 __DIR__ . '/../database/migrations/create_redirect_redirects_table.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_create_redirect_redirects_table.php ' ),
126- __DIR__ . '/../database/migrations/add_description_to_redirect_redirects_table.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_add_description_to_redirect_redirects_table.php ' ),
127- __DIR__ . '/../database/migrations/increase_redirect_redirects_table_url_length.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_increase_redirect_redirects_table_url_length.php ' ),
126+ __DIR__ . '/../database/migrations/add_description_to_redirect_redirects_table.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time () + 1 ) . '_add_description_to_redirect_redirects_table.php ' ),
127+ __DIR__ . '/../database/migrations/increase_redirect_redirects_table_url_length.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time () + 1 ) . '_increase_redirect_redirects_table_url_length.php ' ),
128128 ], 'statamic-redirect-redirect-migrations ' );
129129 }
130130
@@ -143,7 +143,7 @@ protected function getRedirectRepository()
143143
144144 protected function bootAddonViews ()
145145 {
146- $ this ->loadViewsFrom (__DIR__ . '/../resources/views ' , 'redirect ' );
146+ $ this ->loadViewsFrom (__DIR__ . '/../resources/views ' , 'redirect ' );
147147
148148 return $ this ;
149149 }
@@ -162,8 +162,8 @@ protected function bootAddonNav()
162162 $ nav ->tools ('Redirect ' )
163163 ->route (
164164 config ('statamic.redirect.log_errors ' )
165- ? 'redirect.index '
166- : 'redirect.redirects.index '
165+ ? 'redirect.index '
166+ : 'redirect.redirects.index '
167167 )
168168 ->icon ('git ' )
169169 ->active ('redirect ' )
@@ -185,7 +185,7 @@ protected function bootStores()
185185
186186 protected function bootDatabase ()
187187 {
188- if (! config ('statamic.redirect.log_errors ' )) {
188+ if (!config ('statamic.redirect.log_errors ' )) {
189189 return $ this ;
190190 }
191191
@@ -209,17 +209,17 @@ protected function ensureDatabaseExists($sqlitePath)
209209 {
210210 $ oldSqlitePath = storage_path ('redirect/errors.sqlite ' );
211211
212- if (! file_exists ($ sqlitePath ) && file_exists ($ oldSqlitePath )) {
212+ if (!file_exists ($ sqlitePath ) && file_exists ($ oldSqlitePath )) {
213213 File::move ($ oldSqlitePath , $ sqlitePath );
214214
215215 return ;
216216 }
217217
218- if (! file_exists ($ sqlitePath )) {
218+ if (!file_exists ($ sqlitePath )) {
219219 File::put ($ sqlitePath , '' );
220220
221221 $ gitIgnorePath = storage_path ('redirect/.gitignore ' );
222- if (! file_exists ($ gitIgnorePath )) {
222+ if (!file_exists ($ gitIgnorePath )) {
223223 File::put ($ gitIgnorePath , "* \n!.gitignore " );
224224 }
225225 }
@@ -229,7 +229,7 @@ protected function bootDatabaseForErrors()
229229 {
230230 if (
231231 config ('statamic.redirect.error_connection ' , 'redirect-sqlite ' ) !== 'redirect-sqlite ' &&
232- ! $ this ->generalConnectionIsBuiltinSqlite ()
232+ !$ this ->generalConnectionIsBuiltinSqlite ()
233233 ) {
234234 return ;
235235 }
@@ -251,7 +251,7 @@ protected function bootDatabaseForRedirects()
251251 {
252252 if (
253253 config ('statamic.redirect.redirect_connection ' , 'stache ' ) !== 'redirect-sqlite ' &&
254- ! $ this ->generalConnectionIsBuiltinSqlite ()
254+ !$ this ->generalConnectionIsBuiltinSqlite ()
255255 ) {
256256 return ;
257257 }
@@ -288,10 +288,10 @@ protected function generalConnectionIsBuiltinSqlite()
288288
289289 protected function registerAddonConfig ()
290290 {
291- $ this ->mergeConfigFrom (__DIR__ . '/../config/redirect.php ' , 'statamic.redirect ' );
291+ $ this ->mergeConfigFrom (__DIR__ . '/../config/redirect.php ' , 'statamic.redirect ' );
292292
293293 $ this ->publishes ([
294- __DIR__ . '/../config/redirect.php ' => config_path ('statamic/redirect.php ' ),
294+ __DIR__ . '/../config/redirect.php ' => config_path ('statamic/redirect.php ' ),
295295 ], 'statamic-redirect-config ' );
296296
297297 return $ this ;
0 commit comments