this is the sample logic i want to use. this is my sample code. i’m just getting the logic from numbers so i can use to to what i want to display. thank you in advance to those who can help me. Answer
PHP looping over data and getting key/value pairs
I’m using Laravel 8 to loop over some data. I’ve got my data out from my database, but am struggling to loop over the data in a foreach loop, it doesn’t appear to be giving me the key/value pairs, only the index/value pair? But if I var_dump() my $applicationOptions I can see the array insid…
How to put a MySQL table column as a variable in ?
I recently made a PHP, HTML, jQuery chat system and I want the users to have the same name in chat, as their login. The whole webpage is already connected to the MySQL database. I want to focus on how …
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; Error making a migration table
I’m trying to make a webshop using php, laravel, mysql and css. But when i try to make a migration table using foreign keys for products and orders i get this error: SQLSTATE[42000]: Syntax error or …
PHP Query – Check string character
Above code is working where it able to check if the “variable” is starting with ‘ax’, but what if i wanted to check “multiple” different validation ? for example : ‘ax’,’ab’,’ac’ ? Without creating multiple if statement Answer You can use…
SerializableClosure error in Laravel – Your serialized closure might have been modified and it’s unsafe to be unserialized
I am getting this error in my domain where I have used laravel v8 for my site. It shows error in line no 52 in index file: Previously my .env file was not reading. As soon as I fixed that error I got this one now. Please help me solve this error. Answer This issue might occur due to change
Customize URL rewriting with htaccess
I have the following in my htaccess: It works perfectly, the question is whether it would also be possible to automatically redirect it to the new path when the PHP file is accessed directly? For example: example.com/pwreset.php >> example.com/reset-password There are several pages, so I needed somethin…
How to access a json child in php respect validation?
I’m trying to validate the following json file but I can’t find the way to access the “Address” child, how should I do it? Everything goes fine until it tries to access the “address” field. Json: Code: Answer That is the way to access the child of the json:
laravel validation system stop the insertion even the field is hidden by jQuery
in a form I have a select category which allows you to hide or show the inputs according to type to select in select category. this form is to insert an advertisement either title or name use …
Why we have used except(‘logout’)? [closed]
In one of the training tutorials , I saw this code in LoginController but I don’t understand why except(‘logout’) is used. Could you please explain it to a beginner? What does except(‘logout’) mean? …