MongoDB filter on same object in array
I have object with column chars with such data: { "chars": [ { "count": 1, "color": "red" }, { "count": 2, "color": "green" }, { "count": 3, "color": "blue" } ] } I want to exclude records with chars like…
I have object with column chars with such data: { "chars": [ { "count": 1, "color": "red" }, { "count": 2, "color": "green" }, { "count": 3, "color": "blue" } ] } I want to exclude records with chars like…
In my Laravel application, I would like to check wether the value of the field uuid is present in table courses or in table contingents using validation rules. The UUID must be present in one of the two tables to…
I have this middleware in my project, that sometimes, gives me some problems on my live server, and I don't know why, but just sometimes, and not all the times that it is triggered. This is the error: SymfonyComponentHttpFoundationResponse::setContent(): Argument…
I have this piece of code that filters only companies that have some customerRewards related to and belonging to some customer. The whereHas() filter works fine, but the result of customerRewards from $ also contains items with different customer IDs.…
I've recently upgraded my Laravel application to use Bootstrap 5 and I'm having trouble getting Bootstrap's tooltips to work. My application is running Laravel Framework 9.52.16 with Bootstrap 5.3.3 and popper.js 1.16.1. While the default HTML tooltips work fine, I'm…
Please help me, I'm new to Laravel. I'm trying to view data from my table but it shows this error. I already tried different methods but all without success and I use Laravel 9. And sorry if this problem got…
My website incorporates multilingual functionality, allowing content to be displayed in various languages. To facilitate this, language-specific data is stored in the MySQL database within JSON fields. This approach enables flexible storage of language-specific information, with each JSON field containing…
What is the solution for the following error message? foreach() argument must be of type array|object, null given Code <?php namespace AppHttpLivewire; use LivewireComponent; use AppModelsGovernorate; use AppModelsDirectorate; class City extends Component { public $directorate = null; public $governorate =…
Below are the comments given by Coverity scan. Here there is a chance that $data become undefined, but the code "$data ?? []" will solve that issue. If $data is null output of this code will be []. I dont…
I am using Laravel 9, and I'm trying to get the user to confirm their password before moving forward to a certain route; however, what happens is, that after a user confirms their password, they are redirected back to the…