File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ <h1 class="mt-5 text-5xl font-semibold text-gray-800">Laravel Upgrade Helper</h1
69
69
70
70
< div class ="text-center ">
71
71
For upgrade guide see:
72
- < a :href ="guideLink " target ="_blank " class ="underline italic "> link</ a >
72
+ < a :href ="documentationLink " target ="_blank " class ="underline italic "> link</ a >
73
73
</ div >
74
74
75
75
< div class ="text-center ">
@@ -210,13 +210,16 @@ <h3 class="text-xl font-semibold text-gray-900 dark:text-white">
210
210
return 'https://github.com/laravel/laravel/releases/tag/' + this . upgradeVersion ;
211
211
} ,
212
212
213
- guideLink ( ) {
213
+ documentationLink ( ) {
214
214
if ( this . upgradeVersion ) {
215
- let version = this . upgradeVersion . replace ( 'v' , '' ) ;
216
- version = version [ 0 ] >= 6 ? version [ 0 ] + '.x' : version . slice ( 0 , 3 ) ;
215
+ const splitVersion = this . upgradeVersion . split ( '.' ) ;
216
+ const majorVersion = parseInt ( splitVersion [ 0 ] . replace ( 'v' , '' ) ) ;
217
+ const minorVersion = majorVersion === 5 ? splitVersion [ 1 ] : 'x' ;
217
218
218
- return ' https://laravel.com/docs/' + version + ' /upgrade' ;
219
+ return ` https://laravel.com/docs/${ majorVersion } . ${ minorVersion } /upgrade` ;
219
220
}
221
+
222
+ return '' ;
220
223
} ,
221
224
222
225
diffFileLink ( ) {
You can’t perform that action at this time.
0 commit comments