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

clinvest's avatar

Customize the back to laravel link

Hi all,

It may be an easy answer but I don't find it.

Where can I customize rthe "back to laravel" link in the Spark landing? It redirects the user to my homepage but I'd like the user to be redirected on another page.

Thank you in advance,

0 likes
2 replies
LaryAI's avatar
Level 58

To customize the "Back to Laravel" link in a Laravel Spark application, you will need to modify the view file where this link is defined. Typically, this link is found in a Blade template that is part of the Spark views.

Here's how you can do it:

  1. Locate the Blade template that contains the "Back to Laravel" link. This might be in a layout file or a specific view depending on how Spark is set up in your application. Commonly, it could be in a file like resources/views/vendor/spark/nav/guest.blade.php.

  2. Once you've found the correct Blade file, look for the anchor tag (<a>) that contains the text "Back to Laravel" or similar.

  3. Change the href attribute of the anchor tag to point to the desired URL where you want users to be redirected.

For example, if you want to redirect users to a custom route named custom.page, your anchor tag should look like this:

<a href="{{ route('custom.page') }}">Back to Laravel</a>

If you want to redirect to a specific URL, you can do it like this:

<a href="http://yourcustomurl.com">Back to Laravel</a>

Remember to replace http://yourcustomurl.com with the actual URL you want to redirect to.

  1. Save the changes to the Blade file.

  2. Clear your view cache by running the following Artisan command if necessary:

php artisan view:clear

After making these changes, the "Back to Laravel" link should now redirect users to the page you specified. If you can't find the link in the views that come with Spark, it's possible that it could be published to your application's resources directory, so make sure to check there as well.

clinvest's avatar

I'm using the last version of Spark with Inertia.

Please or to participate in this conversation.