Can not get data with right tags

need to get Tasks where all tasktags-> name is in $TagArray array but instead, I get tasks where one of tasktags-> name is in $TagArray I'm...
02

retrieve only identical array

Hi, everybody, I need to get tasks that all tasktags names is in $TagArray but instead if one is in an array it gets I need to get id if all name i...
01

Laravel Outputs Different Output Than MySQL For Query

Hi, I generated a MySQL query which gives the correct output I require (tested on MySQL Workbench). But when I apply the same SQL query using Larav...
02

Do I need to use query builder for this?

Can I use Eloquents active record to create this query or do I need to use the query builder? SELECT * F...
02

do I still need mysqli_real_escape_string in eloquent?

I need to migrate my tables over from the old site to the new site weekly so I can work with up to date data. I just have a blade that shows the t...
07

Count from two unrelated tables

I have two tables employee attendance and employee encounters. These two tables do not have a direct relations however they have the same fi...
04

query function error

I'm getting this error Undefined property: Illuminate\Database\Eloquent\Relations\BelongsToMany::$tasktags for $posts...
01

Divide a column by another column created from Sub query

I've this query - $employees = Employee::where('user_id', $user->id)->withCount([ 'answers as ques...
00

need to compare relation name to array

Hi, Everybody, I need to get data where tasktags name is in $TagArray using wherein $TagsArray = Path::with('pathtags')->firs...
01

Nested Query Function

Hi EveryBody i'm getting this error for my code here Call to undefined method App\Tag::tasktags() $TCompare = Path::with(['...
02

Best practice with many-to-many relationships id's

Hi everyone, I have some doubts with the many-to-many tables id's (primary key). A many-to-many relationship is composed, according to the L...
03

Wherein in query function

Hi, Everybody, I'm getting this error Undefined variable: TagArray When i write this Code $TagsArray = Path::with('pathtags')-...
04

How to display only logged in user data from pivot table

Hi, I have a pivot table meeting-user where I am storing 2 types of user. There are 3 column with increments id , meeting_id...
10

Eager load relations stored in json field

Hi, I'm building a notification system using Laravel's notification system where I store the notification in the database with some relevant...
08

How can I execute a query with nested select?

How can I execute the following query in Laravel using Eloquen? If not with Eloquent, how would it be with the Query Builder?...
03

Laravel hasmanythrough but with manytomany

I have looked at the previous responses on the topic but I'm not sure it works for what I've set up. I have two pivot tables (unfortunately, I didn...
08

Has-many-through-many?

What is the simplest way to achieve this relationship query in Eloquent? I have many boards, which each may have many roles, which each may...
15

Model auto load

composer.json "autoload": { "classmap": [ "database/seeds", "database/factories", "app/Model...
04

Polymorphic relation results in "Column not found: 1054 Unknown column "

I have a polymorphic relationship on my model but some records may be null. To explain better here is the snippet from model showing morphTo:...
01

Replicate model with relationships

Hi there, I want to replicate a template with all his relations ships with Eloquent. I did this and it works like a charm : $...
02