diff --git a/src/Fullcalendar.php b/src/Fullcalendar.php
index 2f89211..7a28b12 100644
--- a/src/Fullcalendar.php
+++ b/src/Fullcalendar.php
@@ -24,6 +24,17 @@ class Fullcalendar
/** @var array */
protected $clientOptions = [];
+ /**
+ * Renders the view that includes the script files
+ * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+ */
+ public static function renderScriptFiles()
+ {
+ return view('fullcalendar::files', [
+ 'include_gcal' => config('fullcalendar.enable_gcal'),
+ ]);
+ }
+
/**
* @return string
*/
@@ -64,9 +75,10 @@ public function setId($id)
private function script()
{
return view('fullcalendar::script', [
- 'id' => $this->getId(),
- 'options' => $this->getOptionsJson(),
- 'include_gcal' => config('laravel-fullcalendar.enable_gcal'),
+ 'id' => $this->getId(),
+ 'options' => $this->getOptionsJson(),
+ 'include_scripts' => config('fullcalendar.include_scripts', true),
+ 'include_gcal' => config('fullcalendar.enable_gcal', false),
])->render();
}
diff --git a/src/views/files.blade.php b/src/views/files.blade.php
new file mode 100644
index 0000000..9558522
--- /dev/null
+++ b/src/views/files.blade.php
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+@if($include_gcal)
+
+@endif
\ No newline at end of file
diff --git a/src/views/script.blade.php b/src/views/script.blade.php
index a8dec39..7a8e7bc 100644
--- a/src/views/script.blade.php
+++ b/src/views/script.blade.php
@@ -1,14 +1,5 @@
-
-
-
-
-
-
-
-
-
-@if($include_gcal)
-
+@if($include_scripts)
+ @include('fullcalendar::files')
@endif