Category "php"

PHP block shortcut in Visual Studio Code

How can I open a basic PHP block in Visual Studio Code, like so - <?php ?>? In Sublime Text I simply type php and press Tab, and the block is created. But

ldap is missing from system when installing adldap2 in laravel

firstly, im trying to install package inside the laravel composer using "composer install", but then it returns an error: Your requirements could not be resolv

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

When I run composer install on command promp, there exist error like this : Problem 1 - Installation request for laravel/horizon v1.1.0 -> satisfiabl

sort() not affecting original array while inside foreach loop

I have array with structure: Array ( [months] => Array ( [01] => Array ( [0] => 16

Finding and editing a WordPress site in cpanel w/o access to WordPress

I have a client who needs his website edited, he is no longer in contact with the original creator of the site, and it seems that the creator used WordPress to

How to install ZeroMQ for PHP on an Alpine Linux container?

To be able to push notifications via WebSockets from PHP using Ratchet, I need to install ZeroMQ as stated in the documentation. However I didn't find any infor

Javascript print function not working inside a modal

I want to print data from a pop-up modal on my website, so in the footer of the modal, I added a print button. (The extra divs at the end are from code above):

Required field only if another field has a value, must be empty otherwise

My question is about Laravel validation rules. I have two inputs a and b. a is a select input with three possible values: x, y and z. I want to write this rule

How to implement functions from PHP openssl_pkey_get_private, openssl_sign on NodeJS?

I write code according to the documentation, where the examples are shown in PHP $data = json_encode([...]); $key = openssl_pkey_get_private( file_get_c

Laravel Pagination links() not working

After doing this in my controller $activities = Package::where('attraction',1) ->where('hotel', 0) ->where('flight', 0)

Reading input in php from terminal

I want to read the following input in php which is entered in termial 3 5 1 4 0 2 5 2 0 5 1 4 4 1 1 7 2 1 13 2 1 3 3 1 7 2 5 4 Where: The first li

Phpunit partial mock + proxy Entity

I tried find solution to my issue but didn't find anything. I use: Symfony, Doctrine, PhpUnit I have one entity class InvoiceNumerator: /** * InvoiceNumerat

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

I use Symfony HttpClient to call an external API. When the status code is 200 I can use getContent() method to retrieve the API response. If the API response is

How to add class name to an existing tag in php

I have a hidden tag in html code: <p class="class1">something<p> and php code: if(SomeCondition){ select element by DOM and add class "active" so

How to disable only_full_group_by option in Laravel

I am new to laravel and I am having an issue with DB problem. I have disabled 'only_full_group_by' sql_mode by editing /etc/mysql/my.cnf file. And I checked sq

Vimeo API: how to save a vimeo into a subfolder?

Which api allow me as developer to move a video into a folder? I, for example, have the video https://vimeo.com/12345678. In my personal area, I created the f

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

I have a belongsTo field on the selection of which i want to show/hide another field using nova dependency container. But it only allows to give id in the depen

Upload media post in instagram using web api

I am using this Instagram media post third party library. When I am logged in in my Instagram account every time I am getting a checkpoint (challenge) required

Symfony there are no commands defined in the "make" namespace

Following the documentation found here I enter php bin/console make:entity Product in Terminal and get the following error: [Symfony\Component\Console\Exceptio

Image upload not working through ajax Laravel

Having a weird issue and I'm sure it's got something to do with the way my script is grabbing the value of the file input field. I know the controller function