I have DB structure: And models: Which is the right way to access to Permission model from User model? I tried this, but in officeUserPermission ...
I have DB structure: And models: Which is the right way to access to Permission model from User model? I tried this, but in officeUserPermission ...
Has anyone seen an example for Laravel Nova where the pivot table points to the SAME table? I'm working with assembles where products can have many p ...
I am creating my first rails application and stuck at this point for a long time. So I have two models in my project. Users (created through devis ...
I have a working Posts, Categories and Tags relationship. (Posts BelongsTo Categories and BelongsToMany Tags.) They work just fine at my view and inde ...
I have this DB/Model structure (example): *Food Category ------------ (id, name) - *irrelevant Foods ---------------------- (id, food_category_id, n ...
I have two models with a relation like this: I need to get all tickets belonging to the same groups the user has. How can I accomplish that? Th ...
I have a model User which have has_and_belongs_to_many associations. app/models/user.rb I want that either user have advisors association or eithe ...
First of all: I have a schema players and a schema matches and I want to establish belong_to, has_many relationship between them in phoenix 1.6. What ...
I have one to many relationship between two entities/tables. When I want eager load this relationship, it seems like there are duplicate queries ...
In a Nova resource, I show a BelongsToMany Nova Field. I would want to simply concatenate (prepending) a "check pictogram" before options values of th ...
Given: Then: I currently have a relationship in my User model as: which currently doent's work. I was wondering if I can make it work whe ...
I have a product list which gets serialized for an JSON API response For that I need also imageUrl which come from ActiveStorage attachments. I stumb ...
I am new to Laravel (using v7) so I apologise if I am doing this incorrectly. I have a custom subscription setup for my users. I have my users table ...
how to get hasmany relation inside another relation in Laravel i want to get product optionGroup with product options i made this but this return ...
I have Post, Tag and Category models. I know how to get posts by tag or posts by category. But I need to get posts by chosen tag and category simultan ...
I have 3 tables :legalpursuit , guarantors, guarantors_legalpursuit. and I have Many To Many Relationships in my project. I save legalpursuit_id in le ...
This may be a simple issue but I'm struggling. Here's what I'm trying to do: I have a class, let's call it Car that HABTM Features. So: Let's say ...
I have 4 tables (Cars, Vignettes, Inspections and Insurances). Vignettes, Inspections and Insurances are "belongsTo" to Cars. I need to combine resul ...
I have two models with no associations between them. So, I generated a migration and added an association. I currently have a page where all th ...
I am having difficulty removing a child from an association. I'm using Grails 4.0.3. The two classes in question are the following: ShoppingCart: ...