Category "php"

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

Doctrine ODM query by subfield of reference-one [duplicate]

I have an existing MongoDb database: Foo { "_id": ObjectId(123456789), "name": "foo_1", "barId": 123, "sellerId": 456 } Bar { "_id"

How to install GD Library? Laravel at AWS Lambda with Bref

When using Intervention\Image in laravel on lambda The following error has occurred. By the way, it works in the local environment. I have to add gd. [2021-08-

Updating a Dropdown Based on the Selection of Another Dropdown - replaceWith Not Working

I have a couple of drop downs, when a venue is choosen from the first one, it should populate the second drop down with floor values. Using jQuery AJAX I am abl

Use identifier in PHP and how does it affect the logic

Use identifier is used when we want to send some outer environment variables inside closures so I have a scenario. $invoiceList = UserInvoice::where('user_id',

Replace character inside double curly brackets regex

I'm trying to replace - character with _ inside a double curly brackets. Example inputs: Hello {{first-name}}, how are you? The event {{event-name-address}} Exa

How can I set one array as a value of another array in PHP? [duplicate]

I have the following array: Array ( [0] => James [1] => Mike [2] => Liam [3] => Shantel [4] => Harry ) Arra

Is a way to echo translation string in laravel?

I want to translate text inside the button. <?php if ($product->category_slug === 'bramy-przesuwne' || $produc

Decoding PHP obfuscated payload

Recently I found a malicious PHP payload on my company's server. The code seems to be encoded into two strings claster and x64. The claster string decodes to th

Rijndael Encryption/Decryption C# to PHP conversion

I have an encryption decryption class written in C# and i need help writing same algorithm in PHP to obtain same output result, any help finding a reliable solu

Ordering Relationship field in CreateOperation - Backpack for Laravel

I wanted to order by name the Categories (relationship field) of my CreateOperation. It is ordered by default by id. protected function setupCreateOperation()

Failed - Network error when i exporting from phpmyadmin [closed]

i always find that error everytime i export a database from phpmyadmin using XAMPP. this is what it looks like, but, if i download another fi

Laravel maintenance mode refresh and render parameter

I am trying to put my application into maintenance mode via php artisan down. php artisan down --refresh=5 works fine and my browser refreshes after 5 seconds I

Custom Text in a href

Can someone help me how i can manage to support this to work with translation text option. <a href="{{url('account/my-review/delete/'.$value->id)}}"