Skip to content

Instantly share code, notes, and snippets.

View emilianotisato's full-sized avatar

Emiliano Tisato emilianotisato

View GitHub Profile
@rodrigopedra
rodrigopedra / BelongsToManyInDifferentConnections.php
Created June 22, 2018 17:29
Laravel BelongsToMany in different connections
<?php
namespace App\Models;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class BelongsToManyInDifferentConnections extends BelongsToMany