I am trying to make a notification system for a school project, jQuery is not allowed! Each time there is a notification I’m creating a div with an onclick button to acknowledge the notification with …
Laravel Models properties declaration
I have the following model: class User extends Authenticatable { private string $first_name; public function name() { return $this->first_name; } } when I call that method from a controller,…
Why does my navigation bar text go higher when I add Bootstrap?
I copied the navigation bar from one Youtube video. I wanted to try Bootstrap and when I added it to my project, the text changed the font and the links went up in the bar. So how do I make the text …
How to sort array with other arrays by date and take a limit in laravel and carbon
I have this array with other 16 arrays and so on… I want to sort the main array by date specified in “meta_date” field included on each “child” array, the sort can be $sort= “asc” or $sort= “desc” and I want to take a dynamic limit for the main array, for …
How to get the meta value of the ACF field (wordpress)?
I need to get the meta value of the ACF field. ACF field called ‘submitdate’ (format => Date Time picker : Y-m-d H:i:s) already has data ‘2021-06-11 17:23:36’ I tried the following code, but it only shows correct $post->ID, it doesn’t show $submitdate. No error in console. …
The second dropdown value for multiple dropdown value NOT SAVE in database using laravel
Hye everyone! First of all, my coding all about dynamic dropdown value, the issues now is the second dropdown value is not save inside the database. Which part did I missed or wrong? View:- View for second dropdown using jquery script:- Controller:- Routes:- Answer The issue is with option value wrongly passe…
Replace multiple   with multiple whitespace
I retrieve an HTML string from the database and needed to change all s’ to white spaces
&…
Getting values to compare from a Explode Array of Strings
I have this string that I’m Getting from a Mysql Result: Result1: Then, I have some ID from another mysql Result like this: Result2: Then I’m using an Explode in order to separate Result1:. Like I’m Getting this: Now, I’m doing I’m using a foreach and then using another explode t…
Can I use autowired EntityManager across different services with DB locking?
In my Symfony 5 project I have 2 services and I autowire EntityManager into both of them: and I run some DB transaction inside one of the MyService2 functions: and I call some helper function from MyService1 which uses also its own $entityManager property and should be executed also inside that same DB transa…
LARAVEL: I am only getting one item from my table when there are multiple items. How would I get all of them and output them?
I am using a session to create a basic cart. In the session there are multiple IDs ranging from 1-3. When I output the data using foreach it only outputs the first item from the table. I would like all the related items to appear. How would I go about doing that? Here is my index function from my controller: