Support the ongoing development of Laravel.io →
posted 7 years ago
Laravel

Hi folks

Could someone please help me out, in a blade file I have:-

			@include('includes.js.autopilot')

Then inside the autopilot blade I have:-

@if(Auth::User())
<script type="text/javascript">
Autopilot.run("associate", {{ Auth::user()->email }});
</script>
@endif

However it's not working, the email is not successfully being included in the script.

Last updated 3 years ago.
0

you might want to put two quotes or double quotes side by side the string

Autopilot.run("associate", "{{ Auth::user()->email }})";
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Kalimukti kalimukti Joined 1 Oct 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.