Add more libraries

This commit is contained in:
Deon George 2021-11-24 16:23:01 +11:00
parent ab86ddc386
commit d376c79fad
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254

View File

@ -219,6 +219,63 @@ class CustomBladeServiceProvider extends ServiceProvider
break; break;
case 'select2':
switch ($content) {
case 'css':
// Base
$urls->put($type,'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css');
break;
case 'js':
// Base
$urls->put($type,'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js');
foreach ($arguments as $option) {
$key = $type.':'.$option;
switch ($option) {
case 'autofocus':
$urls->put($key,'plugin/select2/fix-autofocus.js');
break;
default:
throw new \Exception(sprintf('Unknown [%s] option: [%s:%s]',$type,$content,$option));
}
}
}
break;
case 'simplemde':
switch ($content) {
case 'css':
// Base
$urls->put($type,'https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css');
break;
case 'js':
// Base
$urls->put($type,'https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js');
}
break;
case 'summernote':
switch ($content) {
case 'css':
// Base
$urls->put($type,'https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote-bs4.css');
break;
case 'js':
// Base
$urls->put($type,'https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.18/summernote-bs4.js');
}
break;
default: default:
throw new \Exception(sprintf('Unknown Expression: [%s]',$expression)); throw new \Exception(sprintf('Unknown Expression: [%s]',$expression));
} }