I can’t sleep because of this, I either must be missing something really obvious or it can’t be done like that. I have this Doctrine Query Builder thingy: $this->queryBuilder ->…
Tag: php
Laravel websocket cant connect to pusher ERR_CERT_AUTHORITY_INVALID
I have a laravel application with websockets. I already setup all the needs for the websocket and pusher config. But whenever I test my broadcast channel I got app.js:58283 WebSocket connection to ‘wss://127.0.0.1/app/644a4ac1988060882370?protocol=7&client=js&version=6.0.2&flash=false’…
How to add new method chaining for Laravel Eloquent?
I try to add new method for simplify and reusable code but I failed User Model : public function products() { return $this->hasMany(‘AppProduct’); } public function obsolate() { return $…
OpenSSL Error messages: error:14095126 unexpected eof while reading
Description This error: returns when: Steps to Reproduce Video to download: https://www.youtube.com/watch?v=r5NzAksjfDI Extract the video id: Get the downloadable url Get the array key for the specified video quality etc. Set $url to array Disable SSL Get the file from the url Send the video back to front end…
Adding to select orderby or sortby filtering on search result Laravel
How do I add on select orderby sorting on search result please? laravel 5.8?
PHP get function is empty for hidden container
I am trying to $_GET a hidden input using PHP. When I check the html code in Chrome, Safari, etc., I can see the value of the hidden variable but when I try to echo it with PHP it is empty. All of …
Match a pattern by ignoring different brackets
I have a string and I would like to know the first position of a pattern. But it should be found only, if it’s not enclosed by with brackets. Example String: “This is a (first) test with the first …
WooCommerce hide pay button on my account page for failed/onhold orders
What would you be the correct CSS code to hide the pay button for the failed or hold orders on My Account page. I tried this and it is not working. Thanks. Answer You could use the following: CSS PHP
Convert string to date datatype in SQL Server in PHP Laravel
I’m trying to get a product by id between a specific date range but the problem I’m facing is: date is in string format for some weird reason dates are stored in the database with an incomplete …
Laravel: Use makeVisible() after a hasMany() call
I’m using lumen to develop a REST API. I used for that 2 models User and Post. In my User model I can get all the user’s posts using the hasMany() method: <?php namespace App; use Illuminate…