Hello I have a cookie in laravel and a variable from my server.
I want to validate the result of my server's variable with the result of the cookie.
Normally I would use this but the detail is that my server's cookie has multiple values separated by commas and inside one of them is the value I need.
@if (Cookie::get('DeliveryToken') == '')
@else
No se encontro
@endif
How do I get it to detect the comma separated value? I give you the example.
My variable to compare
"" value = DEL-43421
"DeliveryToken" value: delton,DEL-43421,hp-32
As you can see the exact value after the first comma I need the if to parse all the values after the comma. Or if it is in the first one to stop there and give the result of the if
Aucun commentaire:
Enregistrer un commentaire