Answers for "laravel model relationships with two columns match"

PHP
0

laravel model relationships with two columns match

Compoships adds support for multi-columns relationships in Laravel 5's Eloquent.

https://github.com/topclaudy/compoships

It allows you to specify relationships using the following syntax:

public function b()
{
    return $this->hasMany('B', ['key1', 'key2'], ['key1', 'key2']);
}
where both columns have to match.
Posted by: Guest on December-30-2021

Code answers related to "laravel model relationships with two columns match"

Browse Popular Code Answers by Language