I believe your section should be
@section('bottom-scripts')
...
@endsection
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Spark version 7, with Laravel 5.7 and I'd attempting to add this to the bottom of
/spark/resources/views/layouts/app.blade.php
@yield('bottom-scripts')
As a test in my /resources/views/home.blade.php file I've added this section
@section('scripts')
<script>
$(document).ready(function() {
alert('ho');
});
</script>
@endsection
On my home dashboard screen viewing source, that block is not present at the bottom where it should be.
I've also attempted to add an asterisk in the title tag and that did not render either.
<title>@yield('title', "*".config('app.name'))</title>
I've tried php artisan view:clear and php artisan cache:clear
Also just deleted all the views in /storage/framework/views - didn't work either. I'm stumped.
any ideas?
It looks like you're editing the vendor package (/spark/resources/views/layouts/app.blade.php), which you shouldn't do. Your changes get overridden when you update Spark that way. You should run artisan vendor:publish and install everything related to Spark (also artisan view:clear to clear the view cache). Then edit the views in /resources/views/vendor/spark. See the bottom of the customization guide: https://spark.laravel.com/docs/7.0/customization
Please or to participate in this conversation.