use Jenssegers\Mongodb\Eloquent\Model;
class Post extends Model
{
protected $connection = 'mongodb';
protected $table = 'scheduled_posts';
public function account()
{
return $this->belongsTo(Account::class, 'acc_id', 'id'); // Account model is in MySQL!!
}
}
in Controller
$p = Post::first();
$a = $p->account;
Resulting error:
Call to a member function compileSelect() on null
in vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:1650
in Controller
Resulting error:
screen: http://joxi.ru/L21LYKWF8VY8am
before upgrading to Laravel 5.4 was working fine...