compoships icon indicating copy to clipboard operation
compoships copied to clipboard

Multi-columns relationships for Laravel's Eloquent ORM

Results 32 compoships issues
Sort by recently updated
recently updated
newest added

Please, is it possible to use OR in the association? ```sql foreing_key_1 = local_key_1 OR foreing_key_2 = local_key_2 ```

enhancement

Hi, when i try to execute this code i got this error **stripos() expects parameter 1 to be string, array given** i use laravel 5.8 and compoships ^2.0 i do...

Is there any plans to add a hasManyThrough method?

enhancement

My current relationship using compoships works well: ``` return $this->belongsTo('App\Models\PizzaPrice', ['pizza_id', 'size_id'], ['pizza_id', 'size_id']); ``` but after updating to 2.1.3 and altering it to use: ``` return $this->belongsTo('App\Models\PizzaPrice', ['pizza_id', DB::raw('size_id')],...

I have the following setup in my app: ```php

Can't install packages in Laravel 8 plus

Columns are varchar and foreign key - local key can be upper case- lower case. In this situation; When using $model1->has('model2') it is working but eager loading returns null.

Error message `stripos(): Argument #1 ($haystack) must be of type string, array given` ![image](https://user-images.githubusercontent.com/87007602/143674090-cc710bc2-dafa-4e4c-8fab-8b45b20cbb6a.png) The code ```php use Awobaz\Compoships\Compoships; public function transfer(): HasOne { return $this->hasOne( Transfer::class, ['withdraw_id', 'deposit_id'], ['id',...

I have a condition where I am in need of relating a table with 2 keys that end up relating to another table as one key. I saw there was...

enhancement

Hi, I have table like this: namespace Modules\Personalia\Entities\Referensi; use Illuminate\Database\Eloquent\Model; use Modules\Personalia\Entities\Referensi\Satker; class Kecamatan extends Model { use \Awobaz\Compoships\Compoships; protected $table = 'master_kecamatan'; protected $primaryKey = ['satker_id', 'keca_id']; protected $keyType...