File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,18 @@ function () {
94
94
*/
95
95
protected function bootComponents ()
96
96
{
97
- Blade::component ('cloudinary::components.button ' , 'cld-upload-button ' );
98
- Blade::component ('cloudinary::components.image ' , 'cld-image ' );
99
- Blade::component ('cloudinary::components.video ' , 'cld-video ' );
97
+ Blade::component ('cloudinary::components.button ' , $ this ->getComponentName ('cld-upload-button ' ));
98
+ Blade::component ('cloudinary::components.image ' , $ this ->getComponentName ('cld-image ' ));
99
+ Blade::component ('cloudinary::components.video ' , $ this ->getComponentName ('cld-video ' ));
100
+ }
101
+
102
+ protected function getComponentName ($ componentName )
103
+ {
104
+ if ( (int )$ this ->app ->version ()[0 ] <= 6 ) {
105
+ $ componentName = str_replace ("- " , "_ " , $ componentName );
106
+ }
107
+
108
+ return $ componentName ;
100
109
}
101
110
102
111
protected function bootCommands ()
You can’t perform that action at this time.
0 commit comments