增加自定义js的支持

This commit is contained in:
Wisp X 2022-03-06 11:30:05 +08:00
parent b69bc02b27
commit 67ff633a3f
3 changed files with 7 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
/node_modules /node_modules
/public/hot /public/hot
/public/storage /public/storage
/public/js/custom.js
/storage/*.key /storage/*.key
/vendor /vendor
.env .env

View File

@ -61,5 +61,8 @@
setSwitch(this); setSwitch(this);
}); });
</script> </script>
@if(file_exists(public_path('js/custom.js')))
<script src="{{ asset('js/custom.js') }}"></script>
@endif
@stack('scripts') @stack('scripts')
</html> </html>

View File

@ -26,5 +26,8 @@
{{ $slot }} {{ $slot }}
</div> </div>
</body> </body>
@if(file_exists(public_path('js/custom.js')))
<script src="{{ asset('js/custom.js') }}"></script>
@endif
@stack('scripts') @stack('scripts')
</html> </html>