Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jwheat's avatar

Changes to app.blade.php not rendering

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?

0 likes
6 replies
hfalucas's avatar

I believe your section should be

@section('bottom-scripts')

...

@endsection
Cronix's avatar
Cronix
Best Answer
Level 67

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

2 likes
jwheat's avatar

@CRONIX - Oh my gosh, I'm a moron. I do already have /resources/views/vendor/spark, but saw the /spark directory and tried there.

Thank you for setting my head straight

jwheat's avatar

@HFALUCAS - yea, I'm sorry, you're correct thanks. I do have that in my code, was still hacking on things when I posted this. @cronix was right - ended up being me editing the wrong files.

1 like
jwheat's avatar

@SNAPEY - Yep it does, thanks for pointing that out :) I have this at the top of my home view -

@extends('spark::layouts.app')

ended up @cronix helped me figure out I was editing the wrong views

Please or to participate in this conversation.