Skip to content

Laravel create if statement when img missing in array in blade

How to create if statement in laravel blade when my email with image missing in array ? When email is not defined in array, laravel show error. My goal is when email with image are defined in array show the image, if email isnt defined show custom jpg. my array blade Answer You could use the null coalesce ope…

PHP: connect X.pdf to X.png in a chosen directory

I am looking for a PHP script that connects *.PDF to *.PNG files in a directory. Due to lack of PHP knowledge, I only know how to do this manually in HTML. Could PHP do this for me automatically by …

Symfony inject array through services.yaml

I am trying to inject an array to Event Subscriber, but I also inject an other repository so I don’t know how this will work: Here’s what I am trying: services.yaml TerminateSubscriber.php: It says that the first parameter should be an instance of the Repo, array given. But if I switch the paramet…