Skip to content

Tag: laravel

Show the users that I liked using Laravel

I’m working on a small project using Laravel, and I would like to create a like and dislike system, so a user can like one to many more users. I already have a table called Users (default by Laravel), now I have created another table called favorite_user with id, user_id and liked_the_user. How can I ge…

Foreach Condition with Ajax form submit button

I was trying to do for each condition for form but for some reason, it is submitting all foreach data with ajax. For some reason the response is i want to send only one option data to the cart. But, its adding all foreach data to cart Please help, Thanks Answer This will serialize all forms mounted on the web…

Laravel PUT relationship

Fiddling with Laravel and coming from Symfony, I’m trying to replicate some code. I’m trying to PUT a Suggestion model (overwritting anything, even relationships) and wanted to know the proper way to overwrite the model. Since tags attribute in fillable doesn’t exist, I certainly get an erro…