GithubHelp home page GithubHelp logo

Comments (5)

jgrossi avatar jgrossi commented on May 13, 2024

Hi! Sorry for the late reply ;-)

About you question, are you setting the Database again or are you just calling the Corcel classes? I confess I've never tested Corcel with multiple connections, but in theory it's possible, because Laravel. If you were using with another framework you have to set de database, so just one connection.

As I can see you are using a custom connection name. I will check the code about where it's calling the connection name and return here.

Thanks for using Corcel ;-)

from corcel.

jgrossi avatar jgrossi commented on May 13, 2024

@driesg, what's your default connection for your Laravel app?

from corcel.

driesg avatar driesg commented on May 13, 2024

I'm just calling the Corcel classes

'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'db_name',
            'username'  => 'db_users',
            'password'  => 'db_p',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => 'prefix_',
        )

from corcel.

jgrossi avatar jgrossi commented on May 13, 2024

@driesg give me a minute to make some tests :-)

from corcel.

jgrossi avatar jgrossi commented on May 13, 2024

Hi @driesg!

I made an update on the Corcel lib to allow multiple connection inside relations. Inside Corcel\Post class we where including some hasMany and belongsToMany relations but without specify the connection.

What I did was include the hasMany and belongsToMany methods inside Post class and set the current connection. And it worked!

Please, update your Corcel package trough composer and if everything ok close this issue.

Thanks for using Corcel!

from corcel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.