Skip to content

Values Not Updated in Database

I have a product attribute table, in that, I have 2 text fields. So when I enter the values in all text field box. And when I press the update button. the first input row is updated successfully but the others not. Here is the picture of the blade file: Here is my code Blade.php ProductsController.php Answer …

how to pass form data to controller

I am not getting how to pass data to the controller to update data, below I have given code. // below is my jquery which I am using to pass form data to the controller. // below is my route // inside controller I am having a function called edit profile Answer Is your form method set to ‘POST’? If

How can drop colum in table

Is this query is correct? I’m using Laravel 8, and I want to drop a column in a table. But this query isn’t working. Answer you should use To drop a column, you may use the dropColumn method on the schema builder blueprint: first, you can create a migration file: then, in that migration, make sure…

Unable to add watermark image in existing PDF

I am using TCPDF to add an image watermark to my existing pdf. Only a few of the pdf files are loading the watermark properly (2nd image) and some of them do not support a watermark image (1st image). Also, I want to remove the watermark from the last page of the generated pdf. I am sharing a pdf sample

Check day and do something if it is a workday or weekend

I want to to do something when the day is a workday, and do something else when it is a weekend. But my function echoes “yes” every time, and I don’t get it. Answer Your current check is only checking to see if $dag_datumloop is equal to Monday. The rest are being evaluated on their own. The…

Detect if array contains another array

I’m using external API for my website. When user select city and town, API returns neighborhoods. But the problem is, if there is only one neighborhood array contains name and neighborhood id. But if there is more than one, it contains multiple array for each neighborhood. Single example ; Multiple Exam…