Skip to content

How to authenticate the user in the wordpress?

I am creating a plugin. I need to take some informations from rest api of the wordpress, in this link: http://localhost/wordpress/wp-json/wp/v2/posts unfortunately when I try to get some informations …

How to Decode Base64 to TLV in PHP

I am building an inhouse Invoicing solution for my company. The government requires us to create QR Code fields encoded in Tag-Length-Value (TLV) format. The TLV encoding shall be as follows: Tag: the tag value as mentioned above stored in one byte Length: the length of the byte array resulted from the UTF8 e…

search autocomplete ajax in laravel

I am using ajax for live searching, but the problem is that It is shown only one result when I am using .html() but when I am using append() it works but every word i write it to duplicate the results, here is my code: in controller, ajax code in blade Answer Yes you set your content in your loop

Many-to-many in same model

I need to use a many-to-many relationship to one model. I have an Article model, and I want to make a function so that other articles, typically recommended, can be attached to one article. This is the function, it should work correctly. I have a question about how to create a table of relations in the databa…

use multiple Trait in laravel Controller

problem in use multiple Trait in Controller Traits in CRController error log exec command… composer dump-autoload composer dump-autoload -o php artisan config:clear php artisan view:clear php artisan route:clear php artisan cache:clear not wotking! Answer This is called Conflict Resolution. In a simple …

How do I translate a PHP cURL request to python

I’m coding a tool to get Whois info, and I need to use the WHMCS API for it. This is the code they provide: I want to use this request without PHP, and inside Python. What library should I use and how do I set the variables in the payload?(php or python-style?) Answer What library should I use requests …