How to modify Laravel Spark sidebar view?

405 Views Asked by At

I'm using Spark for the subscription in Laravel for the first time and now I want to modify some changes on the Spark left sidebar.

enter image description here

I have published the Spark View file using the below command but don't know how to place some HTML on the left sidebar.

php artisan vendor:publish --tag=spark-lang
1

There are 1 best solutions below

0
Kevin Marsden On

You can't easily change the HTML, but you can modify the billing portal text in the resources/lang/spark/en.json file. That file is intended to be used for translations, but in a pinch you can use it to change the default text.

If you need to change the HTML, you can find it in this Vue file: vendor/laravel/spark-stripe/resources/js/Pages/BillingPortal.vue (assuming that you're using Stripe).

However, any changes to that file will be overwritten when you update the package, so the best practice is to copy/fork the package. See these answers for more details.