7 months ago

Calling a laravel blade template function in php

Posted 7 months ago by Nikki

Sorry if the title isn't correct, I wasn't sure how get a good title for this. What I'm trying to do is in the normal blade function I have my route, but at the same time I need that route to be displayed out in full in my php.

Here is the code. I hope by seeing the code it will make sense.

<input type="hidden" name="SuccessUrl" value="{{ route('payment.success') }}">

    $success = "{{ route('payment.success') }}";

so the {{ route('payment.success') }} is displayed as http://shop.test/checkout/success but when I dd($success) I get {{ route('payment.success') }} echoed out instead of http://shop.test/checkout/success

I hope this made sense. Please let me know if I need to clarify anything.

Please sign in or create an account to participate in this conversation.