0

I want to parse variables in voyager admin form field and read it in the blade template.

voyager form field value :

LON{{$from}}HER{{$to}}

Im setting the "from" and "to" as date values in the template.

I want the end string to be like: "LON0513HER0520"

how can this be done?

my blade template looks like this:

@php
  $from = Carbon::today()->addDays(7)->format('md');
  $to = Carbon::today()->addDays(14)->format('md');
@endphp

<a href="https://myurl/flights/{{$slider->button_url}}"</a>

form field is called button_url in db and contains: {{'LON'.$from.'HER'.$to}}

But im just getting url as a long string: http://myurl/%7B%7B'LON'.$from.'HER'.$to%7D%7D when parsed. I need it to be http://myurl/flights/LON0513HER0520

Hope this makes sense.

thanks

Nabi Arshad
  • 65
  • 1
  • 5

0 Answers0