I need help to query a model base on its relationship: I have a model called StoreStock, this model is related to a Product model, which has two model relationships, MasterList and Price. I want to get all storeStock with two Product relationships. I know i can do something like With this, i can only pick eit…
Fatal error: Uncaught Error: Class “PhalconConfig” not found in Phalcon Php application
I installed Phalcon PHP version 5.0.0beta3 in my Ubuntu, because it’s compatible with PHP 8.0, but when I run my application some Phalcon classes are not found, I already installed the psr module using the following command: and I have installed phalcon.so by direct download from phalcon php github rele…
Want to get the CSRF Token from this text in CURL PHP
I’m trying to get the CSRF token from raw text, basically, I have a lot of text data on PAGE, I have almost 5-10 CSRF tokens on that page all are the same, I just want to grab one csrf token from text and save into in PHP variable. Here is the code but it’s not working. TEXT Screen: Answer
How to $_GET[‘id’] from a clean url like “example.com/products/123/title-of-this-product”?
I’d like my URL to look like this: The actual URL is this: The .htaccess file correctly interprets my URLs so that users who are on this page only see the clean URL. However, if I try to use $_GET[‘id’] on the products.php page, the script crashes because it doesn’t recognize any id in…
Checkout-PHP-SDK and createOrder connection issue
Trying to implement the Checkout-PHP-SDK paypal API to createOrder JS call.As far as I understand I have to send the data from php file to js approval form. But I am getting an error when I press the “PayPal Pay” button. The JS codes are like below : The php file is like this : Should I create, an…
Sending null values to php from post js
I’m trying to send values obtained from datable to a php file but sends null and return empty values from php This is what’ive tried crud_unidades.php : Now I have no idea on how to assign that javascript variable to the php one to use the phpvariable to look up stuff in my database please help An…
How can I display the featured icon on frontend?
Hello I applied the code I found here. But I can’t figure out how can I call this image on frontend. I tried this so far: but I guess this is not the correct way to get the image link from the custom metabox. Any suggestions? Thanks in advance. Answer You get the photo ID from get_post_meta So the next
Only draw closePath() line
So I’m trying to draw a polygon using the arc function. I know there are better ways to draw a polygon but I’m going to use this functionality to plot points within later on. I’ve got the shape drawn no problem, however, the arc path is visible so I was wondering if there is just a simple wa…
Laravel eloquent update, 500 Internal Server Error
I want to update my database with Laravel eloquent update, but response is always 500 This is my model This is the function This is the route Exception: Thanks before, for helping.. Answer Loking at the exception: Seems like you don’t have updated_at column in your database table. There are two solution…
Get values from SimpleXMLElement Object for php array
I need help with this issue, it seems I can’t get targetCurrency out of the SimpleXMLElement Object This outputs: [curr_code] should output ‘EUR’. How can I fix it? Answer You are using the same variable name for two different things: If you were running with display_errors switched on or ch…