Category "php"

Fresh Laravel install deletes server.php on artisan serve

I'm a bit fresh to Laravel. I installed it via composer in the xampp/htdocs file. I installed the latest version 5.6. The install works with no errors, and the

Phalcon: setStatusCode returns empty response

I'm trying to write error handling for one of the endpoints in phalcon. If I set status code to client/server error code(4xx/5xx), then the response returned is

Two sessions and two different lifetime in Laravel

If change Laravel lifetime sessions in .env file it works for all sessions. How can I determine the lifetimes of every session separately?

Set quantity minimum, maximum and step at product level in Woocommerce

I'm using "set minimum and maximum allowable product quantities to be added in WooCommerce Cart" to require a minimum and maximum quantity order. Now, i need to

How to average columns of data from multiple, flat arrays?

Let's say I have 4 arrays with the same amount of values in each: $array1 = array(0, 7, 5, 0); $array2 = array(2, 6, 10, 0); $array3 = array(4, 8, 15, 10); $arr

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

my problem : i am using laravel framework php i want validate a field witch my field sometime is File(image) and sometime is String(src of same image) is there

Extract Plain Text from Email Body (IMAP Extension)

I'm a bit new to using the IMAP Extension in PHP to check for emails. I don't fully understand all the encoding used in emails. I would like to extract plain te

mcrypt is not installed with the php 5.6

I have installed the php version 5.6 and in order to run my laravel application it is asking to install and enable the mcrypt extension. These are the steps I f

Entity provider not working in security.yml php symfony3.4 ({"code":401,"message":"bad credentials"}.)

I'm using symfony 3.4 with DoctrineMongoDBBundle and LexikJWTAuthenticationBundle . I'm trying to create a user login which return JWT token. If i specify the u

PHP mail function is sending blank message body

I am aware there are other subjects with similar questions however their answered didn't solve my problem. I developed a website and temporarily decided to go

Magento 2 : Allow customer to edit custom options on Cart

I am trying to add functionality to allow a customer to edit options. I have created a Module Vendor/COptions. This is loading custom options and select, howev

Failed when put cache to file in laravel

When i run Cache::put('max_age','100',60)); Then the error said that file_put_contents(storage/framework/cache/data/8f/87/8f87426f74633c0fa8f717150f13e8fc04

Get Woocommerce CoCart API response(add, update, delete) after promotion applied

I would like to get the responses of each route (add to cart, update cart and delete cart) already applied to the promotion. What I face now is it only response

XML to CSV with PHP converter [problem with images grabing]

I really need your help who works with XML and PHP. Looked for many other questions, but still nothing was found about my situation when in xml there is deeper

Creating command to backup MySql database in Laravel

I wanted to back up my database. I am using Xampp MySql. The username is root and the password is not set. I run the command using Command Prompt but it shows n

Dropzone: Submit both form data and dropzone at once

I know there some questions like this, but they didn't answer questions exactly. This is what I need, Upload files using Dropzone Save form data and uploaded im

PHPUnit 7: Failed asserting that exception of type \InvalidArgumentException is thrown

I have this code: public function method(){ //... if(!$exist) { throw new \InvalidArgumentException('Ce client inexistant', 400); } } I do the UT

After submitting the data from the form it directs to white screen

I have an issue when I clicked the button and submit the data from the form.it gets directly to the white screen and nothing happen I checked the database it do

Update Total in checkout of Woocommerce with Ajax Request

Before asking question on SO, I searched a lot about what I needed to make a ajax request with WordPress. All my code and the request is working, but is not doi

api response laravel doesn't show

I have some problem when I want to return a value from api, when I use dd() function it will show the result. But when I use return, it doesn't show the result