Skip to content
Advertisement

Concatenate php in laravel

I am not very good at php. I have a function to check for an empty field and the correctness of email

JavaScript

There is also a code in php.blade in which you need to insert this check

JavaScript

How to do it correctly?

I just pasted into @php and it doesn’t work

JavaScript

Advertisement

Answer

Here is a solution where you dont show the link if there is no valid email

JavaScript

You can also add another @else before the @endif and show a message "no-email"

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement