Find Jobs
Hire Freelancers

Find Solution / Fix Laravel 4.x database query problem -- 2

€8-30 EUR

Fullført
Lagt ut nesten 10 år siden

€8-30 EUR

Betalt ved levering
Hi! I have multiple connection set at config/[login to view URL], defaultconnection is <connection1>, and other <connection2> etc etc... Database are same names, so default connections database is connection1, and etc etc... I have two models: Model Reservations [login to view URL] Model Customers [login to view URL] Testing: [login to view URL] Code finds reservations and connect is right, but if try use method customer, not find customers, because laravel try find table customers from connection1's database instead of connection2's database. So if i move customers table to connection1 database, it works and code show me at var_dump($res->customer) connection is NULL. So Laravel lost connection at this method. I have already tried: - use setConnection instead of Reservations::on('connection2') - set Connection inside of customer method Any Ideas? I have multiple database with same names tables for different companys, so I can't set connection at model protected variable. BEFORE YOU MAKE BIDS: I give you only: - Table structures, maybe example data - Test Code - Info about my connectios - Models for Customers and Reservations I CAN'T GIVE YOU ACCESS TO MY SERVER. And result have work like is reading at Laravel's Eloquent documentation section belongsTo method. In same foreach-loop I need reservation and customer information working not different loops.
Prosjekt-ID: 5960753

Om prosjektet

4 forslag
Eksternt prosjekt
Aktiv 10 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
Tildelt til:
Brukeravatar
Hello, i can fix the issue but i will need ftp and db details, else i cant do it under your budget, let me know if i can help you
€30 EUR om 1 dag
5,0 (172 omtaler)
8,3
8,3
4 frilansere byr i gjennomsnitt €29 EUR for denne jobben
Brukeravatar
We have more than 11 year of experience and working in new technology with MVC architect for more detail Please check Private Message.
€30 EUR om 1 dag
2,5 (38 omtaler)
6,8
6,8

Om klienten

FINLANDs flagg
LAHTI, Finland
5,0
24
Betalingsmetode bekreftet
Medlem siden aug. 4, 2013

Klientbekreftelse

Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.