Skip to content

Symfony reusable AJAX select / ChoiceType

I want to create a reusable AJAX-based select (select2) using Symfony form types and I’ve spent quite some time on it but can’t get it to work like I want. As far as I know you cannot override options of form fields after they have been added, so you have to re-add them with the new config. The Sy…

Posts not ordering by post__in

I am trying to display 3 blog posts that have been selected by the user in the admin. The order should go gridItem1, gridItem2 then gridItem3. I have set out my query below but it shows the selected posts but in date order not in the order I have outlined. I have searched other posts and added in the ‘s…

Sending mail using Mailjet smtp in laravel 8

I need to send a few mails with my laravel application, and they are not really personalized. I’ve used the markdown mail system in laravel, and everything was smooth for the tests. I had mailtrap setup to catch all the mails, no problems. Now I have to use mailjet to send mails – not to create em…

Use a String as a Seed for a Randomiser

It is possible to use a string as a randomiser seed to generate a number between two values in PHP. For example: $seed = ‘John’; srand($seed); echo rand(1, 10);

Add parent to url (PHP)

So my boss asked me to modify some urls of our page like so: What we have -> www.domain.com/finaPage What he wants -> www.domain.com/parent/finalPage I tried creating a directory named ‘parent’ …

Button Soft Delete Not Functioning laravel 8

i’m using laravel 8 to make a function softdeletes. In my view pages, my button is not working and there is no error just not functioning. i’m not sure if this unfunctioning is from the migration or …