guys i have a problem when passing two parameters in the url that is in file web.php That’s my error I used Route::resource(‘/exams/{exam}/questions’, ‘BackendQuestionController’); to define the default routes. In the terminal looks like: And to redirect, it is written this way A…
How to INSERT simultaneously two different arrays in PDO MySQL?
I’m having trouble with a PDO insert. I’d like to insert a multidimensional array into a db, which i managed to. However, i also would like to insert a completely different array, disconnected from the first one into the same db line (which means same INSERT query). 1st multidimensional array = $_…
Detecting an object containing all empty string property values in php or laravel
I need to detect if an object’s (like the below one) all the properties has an empty string as value. How can I achieve this? Answer Since it is all empty strings/null these fields can be filtered out easily: If it has a single property that isn’t a “falsey” value you will get true. FY…
Could you help me understand this PHP code with a PDO query? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Good colleagues, I am learning PHP a little more thoroughly since I am a bit newbie, I alread…
Dynamic custom order numbers based on payment method
I have the following code in my functions.php file: The code works but I want it to permanently save the new order number. It should permanently make CHEXXXX (ex. CHE5783) the order number in the database if the user checked out using check payments. Right now this code only makes it temporary. It does not ne…
ManyToMany relationship get the data
i am try to buid a ManyToMany relationship i have 3 Models movie,genres & moviegenres i want to get all genres for a movie for example $movie = Movie::find(); $movie->genres; i can put the …
How can I fix the SSL problem in Symfony/Goutte
I’m trying to make a request to the website with Symfony/Goutte but I’m receiving such error: In ErrorChunk.php line 65: …
Average Calculation for PHP with variable issue
Morning Everyone, I am trying to troubleshoot this code. I have made progress, but I am doing a simple average calculation. When I try and declare a variable before using it I have issues. When I try …
One page to handle different URL with parameters
The solution is probably very simple, but still, I am struggling to understand how to make it work. We are preparing for the new school year, and of course, we’re required to make things work remotely. We will have a bunch of educational videos posted on Youtube, and an external Windows app will make su…
print_r not allowing me to escape []
How can I escape the []? If I execute the following code, it just throws me an error Answer The name is just Name and you should use implode to join the pieces back together. This assumes your parameter is always Name[].