Support the ongoing development of Laravel.io →
Xum

Xum

Joined 12 Apr 2015

Statistics

Threads 0
Replies 188
Solutions 31
Articles 0

xum has not posted any threads yet

replied 10 years ago

Eloquent: Filter by joining two "belongsToMany" relations

First what comes to mind is just $user->badges()->recipes. Have you tried that?

0 Likes
replied 10 years ago

"Loading" model event? Need to adjust attributes of unknown names...

@eckenroed, maybe you could go a bit deeper and do automatic date conversions by overriding fromDate...

0 Likes
replied 10 years ago

file_put_contents(~/services.json): failed to open stream: Permission denied

@topwuo, If your php scripts are run as nginx, then writing to ~/services.json will write to nginx's...

0 Likes
replied 10 years ago

query building : "complex" join

@Grummfy, Yep, you can specify more complex join conditions, see docs on query builder

0 Likes
replied 10 years ago

Eloquent mass-assignment with file upload

Pretty much how you described, but don't use POST array, use Request's methods. $uploadedFile = $req...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.