Category "php"

Is there any way to access a Symfony secret value in userland code?

Despite making them appear to be environment variables, Symfony does not actually load secrets into the environment, so you can't access them via getenv() or $_

Only display Woo Commerce sub-categories based on selected Parent Category in a wordpress widget sidebar

I have a WordPress sidebar that I want to only display the children of the parent category. My structure is as follows All Products > Parent Category > Ch

Woocommerce how to add account details to billing address automatically

I would be much grateful if you help! I have custom registration fields that are correctly saved in database and are accessible through: $user->['users_tel']

Google My Business Information API - Get locations list of the authenticated account with php library

I'm currently working with Google API through this great php library but it doesn't support the last API and most of his method are going to be deprecated. I al

Laravel 8: How to set default value of all enum values

I want to assign all default values for allowed_file_types column in products table which are all values of enum FileTypes. But now I have no way to do that. Ca

Authentication Api using user name and password in flutter web

I try to authenticate api using user name and password it worked good in flutter android app but in flutter web do not get any data below my authentication func

How to convert PHP multidimensional associative array to API http query in the format the API specifies? [duplicate]

I have the following array $folder_data = array( "title" => "Testing API Creation", "description" => "Testing the Wrike API by c

How do I send multiple image attachments in html form with php?

This form handles the form data and a single image nicely. However... when I add the brackets [] to the file input name to handle multiple images, I receive no

HTML returning as text Laravel Controller

I am trying to return HTML from Laravel controller, but it is returning as plan text: Example: <input type="checkbox" class="row-select" value="9"> ->a

Hide WooCommerce Subscriptions 'cancel' button after 90 days

I am trying to show/hide the 'Cancel' button within the subscription details in 'My Account', based on the subscription start date. However I am finding the int

What is While Feof alternative for big file downloads?

I use this while loop to fetch the file; <?php while(!feof($fp)){ //get this file with feof but dont tell file location on the server $buffer = fread($fp,

Laravel - Sanctum Remove Database Id From Generated Token

Currently I am building rest API using Laravel. For authentication, I am using the Sanctum package. Every time a user is logged in it generate a token that look

Frontend/Backend Serving on Ubuntu Server 20.04

I am working on my first web-project and therefore use an Ubuntu Server 20.04 with apache2. Now i struggle with the correct frontend/backend-serving of my websi

WooCommerce product images in other plugin

I'm trying to get product thumbnail images into a PDF packing slip template on a WooCommerce site, but as a beginner can't really figure out how to call the pro

How to rename file using in PHP Using CURL?

I need to rename a file in the server FTPS. I'm using a useful class FTP_Implicit_SSL I have found on the Internet (I need also CURL). I can list directories, u

Images don't save using Faker Image in seeder

I'm doing a project on Laravel 7 with FakerPHP, I want to populate my database with some random images and at the same time saving them on my local storage fold

How to reliably detect an expired Laravel session?

I am working on a web client which does a lot of AJAX request. The backend is written in Laravel. If the backend throws a PHP exception, the backend sends a JSO

Cannot request microsoft access token for OneDrive file upload within PHP

I need some help. Since 2 days, I'm reading several tutorials and trying out code snippets I've found to get an access token from Microsoft to upload a single s

How to add AUTO REFRESH in ANGULAR JS

Im trying to add auto refresh feature on my system using angular js but i cannot find correct tutorial for this. Please can someone help me. the auto refresh fe

split long method in different methods

I have this method: public function createExcel(Task $task = null, Project $project = null, $projectTitle = null) { $this->spreadsheet = new Spre