I want to join 2 tables by a foreign key stored in a JSON field. The field can be empty, so i get an error, i can not sem to get rid of. I have a model Transaction: the items field is json: now i want to join these tables for a query: The problem is, that i have many
How can I create a MockResponse with statusCode 400 header for MockHttpClient?
I would like to test different responses from an API using symfony/http-client, but how can I create statusCode 400? This is what I tried: public static function mockShipmentResponseFail(): …
Foreach empty ul
I use these few lines of code to list folders and subfolders. It works pretty well but I don’t understand why I end up with :
. This is my PHP code :
Multilingual PHP Inline Replacement in HTML ([en]…[/en] etc.)
I am a coding beginner and have my PHP/HTML web project in German. Now I want to make it available in English in the easiest way. I don’t want to add other languages in the future, so I want to try it …
PHP’s date_diff() is behaving unexpectedly
It’s probably just me being dumb, but … <?php $startDate = date_create('2019-11-01'); $endDate = date_create('2019-12-01'); $interval = date_diff($startDate, $endDate); …
Executing php script with parameter using powershell
I am trying to call the PHP file by, passing the request_number in the localhost URL using Powershell In HTML: <a href='workflow_execution_progress.php?view_id=".$row['request_number']."' …
SilverStripe 4 (cms4 / SS4): How to make Next / Previous navigation of sibling pages?
I’m looking to create a simple Next and Previous navigation on sibling pages to allow the user to click through them. They are all on a single level. I’ve found some docs and an add-on (link below) …
Fetch database results by choosing dropdown option
I have a small problem with my filtering system I’m creating. I have a dropdown with database categories and one category is “Alle” (english: All) and is chosen by default. This option is …
How to use my own pre-existing table for authentication in laravel 8?
I installed auth in laravel 8 but I don’t want to use the default table dedicated for authentication Users because I have my table Users_inf in this case I can’t use migration, Users_inf also has 200 records. Users_inf(user_id, password, user_name,privilege,active,CREATED_AT,UPDATED_AT). CREATED_A…
How to get custom fields values from WooCommerce orders
I have checked similar questions but couldn’t resolve the problem. This is my code so far: It is giving me this error: “billing_vergi_dairesi was called incorrectly. Order properties should not be accessed directly”. So I replaced $order->billing_vergi_dairesi; and $order->billing_verg…