Fecha de registro: 14 may 2022


Fotos De Lia Crucet Desnuda marhami




Q: Laravel 5.4 Eloquent not working as expected with the group by I have this query in Laravel and I'm trying to get all the servers by country. $servers = Server::where('country', $country) ->orderBy('name', 'ASC') ->get(); $serversCountries = $this->countries()->get(); And the relationships: Server.php public function countries() { return $this->belongsToMany('Country'); } Country.php public function servers() return $this->hasMany('Server'); And the dd($servers); is just returning an empty array. I've tried the same exact code and it works, the only difference is that i just use the id from the request and not the variable and it works: $servers = Server::where('country_id', $id) The same thing is happening when i use the whereIn: $servers = Server::whereIn('country', $serversCountries) I am using Laravel 5.4 A: I think the problem is in that you have a whereIn in your query, but the variable you are passing in has values. I think you want: // this variable has a key value pair of countries, if you wanted to use // a query to get all countries, then you should do it like this: $countries = $this->countries; $servers = Server::whereIn('country', $countries) ->orderBy('name', 'ASC') ->get(); And, by the way, whereIn requires that the values you want to search are strings, so: $countries = $this->countries()->get(); $serversCount




Golfing Over It With Alva Majo Cheats Tool Download

Remo Repair Outlook (PST) Cracked [Full]

Wondershare Video Converter Ultimate Multilang Crack


Windows XP SP3 Dark Lite Edition 2 2011Friso UL


Fotos De Lia Crucet Desnuda marhami

Más opciones