Find Jobs
Hire Freelancers

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

€8-30 EUR

Færdiggjort
Slået op næsten 10 år siden

€8-30 EUR

Betales 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.
Projekt-ID: 5960753

Om projektet

4 forslag
Projekt på afstand
Aktiv 10 år siden

Leder du efter muligheder for at tjene penge?

Fordele ved budafgivning på Freelancer

Fastsæt dit budget og din tidsramme
Bliv betalt for dit arbejde
Oprids dit forslag
Det er gratis at skrive sig op og byde på jobs
Tildel til:
Brug Avatar.
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 på 1 dag
5,0 (172 anmeldelser)
8,3
8,3
4 freelancere byder i gennemsnit €29 EUR på dette job
Brug Avatar.
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 på 1 dag
2,5 (38 anmeldelser)
6,8
6,8

Om klienten

Flag for FINLAND
LAHTI, Finland
5,0
24
Betalingsmetode verificeret
Medlem siden aug. 4, 2013

Klientverificering

Tak! Vi har sendt dig en e-mail med et link, så du kan modtage din kredit.
Noget gik galt, da vi forsøgte at sende din mail. Prøv venligst igen.
Registrerede brugere Oprettede jobs i alt
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Indlæser forhåndsvisning
Geolokalisering er tilladt.
Din session er udløbet, og du er blevet logget ud. Log venligst ind igen.