0

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
  • Did you make changes to the view you published and they don't show up? – brombeer Sep 06 '21 at 06:39
  • I'm not sure I want to place some HTML in the sidebar. After publishing the view file, I'm getting this HTML in app.blade.php. ` @inertia ` –  Sep 06 '21 at 06:43
  • All the HTML is coming from the `/vendor/laravel/spark-stripe/resources/js/Pages/BillingPortal.vue` file –  Sep 06 '21 at 06:46
  • From the [documentation](https://spark.laravel.com/docs/1.x/spark-stripe/customization.html): `php artisan vendor:publish --tag=spark-views` to publish the views, `--tag=spark-lang` publishes the localization files. Views should then be available in `resources/views/vendor/spark/` – brombeer Sep 06 '21 at 06:50
  • Yes. The view is available and has an app blade file in the spark folder. In-app blade having this HTML ` @inertia ` but how to add some html in sidebar? –  Sep 06 '21 at 07:14
  • I don't have a Spark license so I could only give this rudimentary tip. Sorry – brombeer Sep 06 '21 at 07:17

1 Answers1

0

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.

Kevin Marsden
  • 677
  • 1
  • 10
  • 17