Category "php"

PHPExcel How to set conditional formatting to change cell background color based on cells values

Good morning, I need to set cells background colors using PHPExcel, but I don't know how to do it. This is for my header and It's working: $styleArray = arr

Is there any built in function in javascript/jquery to filter email like php's function (!filter_var($variablePassed, FILTER_VALIDATE_EMAIL))

// check if e-mail address is well-formed if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Invalid email format"; } This code is filtering

307 temporarily moved code when page loads in Chrome

I have run into a dilemma I cannot figure out. All my pages (currently being served on both localhost & a live server) redirect twice with a 307 header code

Firebase Security Rules Storage from specific web url

I want to set the security rules of the storage to be that only data that send from my web (specific web url) can be stored. Otherwise no one can write and read

How can I make a full text index of the column?

Here is my current migration: class News extends Migration { public function up() { Schema::create('News', function (Blueprint $table) {

Footer works on xlsx exporting but not in Mpdf with Phpspreadsheet

Hi everyone and thanks in advance for your help. I'm trying to set Footer to a pdf Phpsrpreadsheet generated file but, although it works when I export it in xls

PayPal subscription PHP Laravel

I create a plan and everything is correct, I enter the PayPal platform and pay and everything is fine, it redirects me to my website and everything is correct s

Sum array values

I’m making a shipping service app to Shopify and my callback URL have this JSON post using json_decode to make an array. The value I want to sum is grams

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

I have overlook at this issue Linux - PHP 7.0 and MSSQL (Microsoft SQL) and I am sure did exactly what MS told me to do in this page installing-the-drivers-on-

Mailjet API: how to add template parameters?

I use the Mailjet API PHP library. And I want to send an email with a template. How can I add template parameters to my function sendEmail? Thanks

Limit login attempts in Laravel 5.7

I have Laravel 5.7 project with custom login. How can I let Laravel accept three login attempts after that redirect for page waiting to 2 or 3 min, etc? public

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

I found this posted as a comment on another thread but I don't know what I'm supposed to do with it: if($product->get_stock_quantity() <10){echo 'Limit

How to get monthly wise data in laravel

I have a lot of data. I want to bring the data from the database as a monthly wise. I have already used group by method but when I want to view the data all the

How to create a video stream from a single dynamic image in PHP

I have a single image file on my server which its content changes every 100 ms. I can load and serve this image as usual: $image = file_get_contents('path/to/im

How to validate Envato Purchase Code in PHP

I'm working on Envato API to verify Purchase Code I used plugin sample code from GitHub https://github.com/codehaiku/Envato-Purchase-Code-Verifier here I added

if statement inside concatenation

If the user is verified then a verified icon must be shown next to the comment author <?php if($data->verified): ?><i class="fa fa-check-circle">

WordPress + Nginx on non-standard port behind AWS ELB results in broken links

We have a Nginx listening on ports 80 and 443 and serving our main website. Let's say its name is demosite.com. It is running on AWS EC2 instance, and traffic

Form repeater send wrong data with last element in Laravel

My form sends multiple forms of (name and image). However, the last element sends a name only with the wrong 'name.' Do I need to simultaneously make multiple i

How active a function with time interval PHP | Codeigniter 3

There's a way to call a function every minute? i have an API call from my codeigniter controller with cURL, can php call that function every min?

How to reset Laravel AuthManager/guards in between API calls in tests?

I'm writing a Feature test for an API and I want to test custom auth logic. I know that when I call the login API endpoint, Laravel caches the fact that the use