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

arketekt's avatar

Don't Touch!

Hi everyone. I'm just getting started with Spark, I watched the laracasts on Spark and reading along here in the discussion forums. I'm new to Laravel in general but I believe I have the concept down of using Laravel so I'm trying to apply how I might work with a Laravel project with Spark. Where I'm confused is not knowing exactly what files I probably shouldn't touch. As an example I know the folder and contents of the Spark directory in the root of the project should not be touched so if I wanted to override the bootstrap variables I would import my variables at the top of the app.scss file in resources/sass/app.scss and because of the way Mix works it would overwrite Sparks bootstrap variables. I think this is pretty clear but whats not so clear is say for instance I want to remove the Google fonts which are located in the head of app.blade.php and blade/app.blade.php being that both of these files are located in the Spark directory would I run php artisan vendor:publish which would copy those files to the resources directory in the root of the project and then modify all those two files there or would I follow Sparks convention of creating a "layouts" folder in my resources/views directory and create those two files there and have them referenced by all my apps children files e.g.

resources/views/layouts/main.blade.php replaces @extends('spark::layouts.app')

resources/views/welcome.blade.php

@extends('layouts.main')

@section('content')
<div class="container">
    <!-- Welcome -->
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <div class="card card-default">
                <div class="card-header">{{__('Welcome')}}</div>
                <div class="card-body welcome">
                    {!! $welcome ?? '' !!}
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

Help, advice, guidance is greatly appreciated! Thank you ☺️

0 likes
2 replies
aurawindsurfing's avatar
Level 50

Hey @arketekt

Yes this is exactly the way you should do this:

php artisan vendor:publish

The overwrite anything you like in resources/views In those views there should be references to the styling files so you might just want to write your own styles and drop the basic ones.

Hope it helps!

2 likes

Please or to participate in this conversation.