Skip to content

Tag: php

Laravel – delete whole collection

I have images for articles, and when I am updating article I would like to check if the images are the same, if not I would like to delete them but if it is possible I would like to delete the whole collection without another query, something like what I have in the code below $images->delete();. This is m…

Know when qr code is being scanned

As the title says..Is there a way that i can put a qr code in my webpage and when a users scans it whith his phone then the webpage(opened in a desktop computer for example) redirects the user to another page.NOT on the phone.I want to redirect the user when he scans the qr code but not on the phone..only

How to render json into a twig in Symfony2

The question is how to pass a json to twig to render a template. I’ve tried to pass a json with JsonResponse object but I did not find the way to render the template. TarifasController.php index.html.twig How can I pass a json from the controller to use it in the DataTable (in twig template) but mantain…