I’ve built a website login form on my local Windows machine that works perfectly but when deployed on an Ubuntu web server, the login for redirects to /login.php# Below is the code used – LDAP has been uncommented from the extensions section in php.ini on the Ubuntu server. Is there something Linu…
How to change and set the loop for the following code to display “Purpose & Stamp” only?
My code can print only separate invoice for each different product and I coded it for single product only but I need to add multiple product print in single paper. I am facing syntax error to change …
How to ensure, that column names are equal in laravel?
I am currently working on a laravel php project. In this case, a table containing countries should be created. There are three fields within the table: a short country code column called country_code and the name of the country in german and english language in the columns country_name_de and country_code_en.…
Laravel 8: delete() does not delete from the DB
I’m working with Laravel 8 to develop my forum and I wanted to add some Like and Unlike functionality to question that have been asked by users. So Like function works fine but for Unlike, I got some problem. Here is the method for Unliking: And here is the form behind this: So the problem is it does no…
Laravel 8: Call to a member function user() on array
I’m working with Laravel 8 to develop my forum project, and I wanted to add some like functionality to question that has been asked on forum by users. So here is a form on question.blade.php: And then at LikeController, I added this: But now I get this error: Which is referring to this line: So what is …
jQuery send data to a new open tab and get the data
I want to send some data from ClassA to ClassB . So what I did is I create a hidden form in my ClassA view page and post it to ClassB. Then from the js part But then I dont know how can I get the post data from ClassA. I have tried getting the data from $_POST in the
: SQLSTATE[HY000]: General error: 1364 Field
I got this error, when I added columns on create_posts_table.php. I was creating UserSeederTable but it doesn’t work. And why can’t I create PostSeedertable now? Before the columns adding, there were no errors. Please help. Answer It’s telling you that user_id cannot be null and it’s c…
how can I count same products in order table in laravel eloquent? I`m new Laravel user
Here is my Orders table . How many same product are sell. I needed Answer You can write your query n LARAVEL Eloquent in this way.
Display date with ordinal suffix in PHP
I am currently displaying date in my php code like below its giving me output like Monday Mar 08 2021 Instead I want output like Monday Mar 08th 2021 I have found function on this answer But I am not getting idea how I can use it with my date format. Let me know if anyone here can help me
How to replace all timestamps to date in a single string in PHP?
i need to replace all timestamps into a date but they’re all in the same string and the output needs to be in the same string, i tried different methods but i can’t get it working The string format is like this one: The output should be like Answer preg_replace_callback() will do the job for you.