Category "relation"

TypeORM: how to load relations with CreateQueryBuilder, without using JOINs?

I'm developing an API using NestJS & TypeORM to fetch data from a MySQL DB. Currently I'm trying to get all the instances of an entity (HearingTonalTestPage

How to make a foreign key not using primary key

I have a migration on Laravel for table pasien like this : public function up() { Schema::create('pasien', function (Blueprint $table) { $table->

Laravel detach not working on belongsToMany

I have this model: Company Which has a relation: $this->belongsToMany('App\CallList', 'call_list_companies', 'company_id', 'call_list_id') And vice versa: Ca

Laravel, get relation row instead of id

I want to get author row instead of author_id. I could this with add collection and change one by one but has Laravel any function for this? Well, I want make t