I have tried using later and queue then specified the seconds like below but i get an error saying “Only mailables may be queued” and Here is my code when sending the email Answer The docs clearly describe how to delay mail sending: Delayed Message Queueing If you wish to delay the delivery of a q…
Tag: php
Call to undefined method stdClass::isEmpty() error
I am trying to check if the $pl1 is empty but it does not seems to work. I tried using count() but does not seems to work either. controller: blade.php: Answer The variable $paperlist1 is the Collection, so ->isEmpty() will only work on $paperlist1 and not on $pl1 as $pl1 is each value of the collection. S…
Generic way to rewrite external /api/entity/1 URL to internal /api/entity.php/1 (or /api/entity.php?id=1)
With a API I’m trying to make in PHP I currently have these rewrite rules setup in the .htaccess file for the root directory of the API: This is so that requests to the API appear more “RESTful” – so instead of api/entity.php?id=5 it would be api/entity?id=5 – I’d like to g…
PHP get arrays from one and add to the property of another
I have two arrays. One is taxonomies: and postTypes: Is it possible to combine the two arrays to get something like this? I’m trying to add the label and value from taxonomies array into postTypes array but I’m not sure how to match the keys and combine the arrays. Is this possible with a foreach …
Apache2 PHP – How do I use .htaccess to rewrite direct download links
I have a directory of files which are downloaded by users package managers using the direct link to the file. I’m trying to set up file logging, so I can get statistics on the downloads. I’m using this script I found on GitHub: https://github.com/iNamik/PHP-Download-Tracker I’m using the above scr…
The value of my variable is changing In another file
I got this varible: My problem is that the user can change the value in #box. So it contains x different li:s then my var things is not set anymore. How do I change this var? var things is in my index.php file. The place where the user changes the #box is in my change.php file, so I think It’s
Export array to Excelwith MaatwebsiteExcel
I am beginner web developer. I make my project with use Laravel 8 and Maatwebsite Excel. I make this code to prepare data to save to excel file: Generate data work fine. My debug return this: I have problem with save my data to excel file. When I run my code I have downloaded empty file (without my data). How
Select DISTINCT returns duplicates data Laravel 8
I’m trying to get groups that belong to a supervisor to be displayed for him. And I’m using join to get each gpid information base on supervisor_id, query its okay but returns duplicate data of the last row. I can’t figure out why it is duplicating the last record. Any help would be much app…
How to validate integers and max float digits in one rule in laravel
Hey guys I need to validate something on my laravel application and I don’t know how. So if the user introduces 1234.55 it should allow it, because it have only 5 numbers, but if the user introduces 12345678.55 must reject! What I have until now. I tried to use digits_between, but when I use this, the v…
Change sender name to value from order meta data in WooCommerce email notifications
I’m trying to change WooCommerce sender email name based on the order meta. The website is a multi vendor marketplace, so each order contains meta data with the business name to which the customer orders. So when the order status changes to processing, what I am trying to do is get the business name fro…