I have managed to get push notifications working but I have trouble on how to send notifications to specific users. Perhaps using a customer number or name etc. I don’t know where to even start. I have spent weeks reading hundreds of web sites and I can’t seem to work it out. These are just a few …
Tag: php
Websockets file upload is corrupted (or wrongly encoded) – PHP and JS
I´m working on websocket scripts in PHP and JS and have issue with saving a file (img) Sending from JS: Saving in PHP It saves the file, but it is corrupted, or wrongly encoded… The uploaded picture is slightly smaller (few bytes) and there is nothing readable in hexeditor (while in original I can read …
Unique validation with 2 columns – Laravel 8.x
I’ve been trying make my validation so that an extension must be unique to it’s own company but not to other companies. Here is my DB table: And my validation rule looks like this: But still I got errors saying that the extension number is already taken. It seems that the Unique rule doesn’t…
What the template_content should be in case that template itself has no need for it (eg template has no mc:edit)?
I replaced the mandrill/mandrill package with mailchimp/transactional. Also I have a tamplate named MYTEMPLATE-001-GR with mergevar name. And I try to send an email using that template: But the response is the following: Meaning I should provide some value in template_content but my template has NO input fiel…
undefined variable reimage laravel
I am trying to crud the image but it say undefined variable reimage code: CategoryController } web.php add.blade.php ** and I am trying to make new name for the photo as the name is time+the orginal name ml> and I am trying to make new name for the photo as the name is time+the orginal name ml> and I am
Laravel does not show all the available results from table
I am working with Laravel 8 to develop online ordering project and in this project, I want to show all the orders from orders table if the status of each order is set to awaiting, so here is my code: But now the problem is, it only shows the first result from table, however there are more than one record
Show order downloads in admin new order email notification in WooCommerce
How can I include this “Downloads” section (attached) in the admin email? By default, WooCommerce only sends it to the customer, not the store owner. I tried looking at articles that showed how to customize WooCommerce emails and I think that woocommerce_email_order_details is the hook that I̵…
Connection refused for Sanity API call
I’m using the sanity php client to fetch some data off of sanity. This is my query: This is the error I’m getting: The odd thing is: everything works fine in my local dev environment. but testing this on the webserver results in the error. I added the CORS origins so both localhost and the Webserv…
Deleted images still being shown
For some reason, my website still showing images that were already deleted from the specified folder and I have no idea why that’s happening and how to solve that. Process: When the button to delete all admins is pressed, it calls a PHP function that truncate the tables administration, adminimg and logi…
How to group array by key in PHP Laravel Builder query
I am new Laravel and I just want to group my array by key. Here’s what I have done so far: Code: Return Value: I just want something like this: I tried foreach to $vehicles variable but it says Cannot use object of type stdClass as array is there any way to achieve this? thanks in advance. Have a good