Registry / orm / awobaz-compoships

awobaz-compoships

JSON →
library3.0.2phppackagistunverified

Laravel relationships with support for composite/multiple keys.

composer require awobaz/compoships
INSTALL
IMPORT
SIG · AWOBAZ-COMPOSHIPS
A
awobaz-compoships
ormphpv3.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HasMany
use Awobaz\Compoships\Database\Eloquent\Relations\HasMany;

Define a HasMany relationship with composite keys.

use Awobaz\Compoships\Database\Eloquent\Relations\HasMany; class Order extends \Illuminate\Database\Eloquent\Model { public function items() { return $this->hasMany(Item::class, ['order_id', 'customer_id'], ['id', 'customer_id']); } }
Debug
Known issues
gotchaMay conflict with Laravel's native relationship methods if not used carefully.
fix
Ensure you use the Compoships traits and avoid overriding core methods.
affects: >=3.0.0
Upgrade
Version history
3.0.2latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
36
Resources
awobaz-compoships — pip install awobaz-compoships · libregistry