From 3276a43a4c4a95e4c541abab21a7da70087ce3a7 Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Fri, 15 Feb 2019 12:03:09 +0000 Subject: [PATCH 1/2] Busts custom JS/CSS assets by adding random query string. --- resources/views/default.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/default.blade.php b/resources/views/default.blade.php index 9da41dfb..a3ee51e4 100644 --- a/resources/views/default.blade.php +++ b/resources/views/default.blade.php @@ -47,7 +47,7 @@ {{-- Custom CSS --}} @if(!empty(config('larecipe.ui.additional_css'))) @foreach(config('larecipe.ui.additional_css') as $css) - + @endforeach @endif @@ -67,7 +67,7 @@ {{-- Custom JS --}} @if(!empty(config('larecipe.ui.additional_js'))) @foreach(config('larecipe.ui.additional_js') as $js) - + @endforeach @endif From f77d7d56b868d1c2f9e9772caf42b2f11f5d07cd Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Fri, 15 Feb 2019 12:26:07 +0000 Subject: [PATCH 2/2] Adds feature test BustCustomAssetsCacheTest. --- tests/Feature/BustCustomAssetsCacheTest.php | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/Feature/BustCustomAssetsCacheTest.php diff --git a/tests/Feature/BustCustomAssetsCacheTest.php b/tests/Feature/BustCustomAssetsCacheTest.php new file mode 100644 index 00000000..dd3bc3b8 --- /dev/null +++ b/tests/Feature/BustCustomAssetsCacheTest.php @@ -0,0 +1,36 @@ +get('/docs/1.0') + ->assertStatus(200) + ->assertSee("/js/{$customCssFile}?id=") + ->assertSee("/js/{$customJsFile}?id="); + + } + + + +}