skip to Main Content

I’m having trouble getting the record id encrypted in the url. The error is Unclosed '(' does not match '}'.

action="{{ url("delete/$hxh->{{Crypt::encrypt('id')}}") }}"
href="{{ url("update/$hxh->{{Crypt::encrypt('id')}}") }}"

How do I correctly resolve this in blade.

2

Answers


  1. Chosen as BEST ANSWER
    action="{{ url("delete/".encrypt($hxh->id)) }}"
    href="{{ url("update/".encrypt($hxh->id)) }}"
    

  2. The syntax highlighting in your question shows the issue.
    You need to escape your quotes:

    action="{{ url("delete/$hxh->{{Crypt::encrypt('id')}}") }}"
    ref="{{ url("update/$hxh->{{Crypt::encrypt('id')}}") }}"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search