Support the ongoing development of Laravel.io →

jsvensson

Joined 13 Mar 2014

Statistics

Threads 3
Replies 9
Solutions 0
Articles 0

Using model scopes gives Method not found

I'm having a bunch of trouble with model scopes. I have one scope that works properly, called direct...

0 Likes
4 Replies
Solved

Eloquent not inserting null values on pivot table

I'm having problems where I want empty strings or a zero to be stored as a NULL in the database. Her...

0 Likes
3 Replies
Solved

Rearranging JSON output

I have this basic model of a Contest with several Events, where each Player can have one result per...

0 Likes
13 Replies
Solved
replied 10 years ago

Using model scopes gives Method not found

Doh. Yeah, parantheses on $player->results() was the issue. I'm coming from Ruby where we don't h...

0 Likes
replied 10 years ago

Using model scopes gives Method not found

Nope, no go. Tried naming it scopeTest() and trying $players->contest->test(), still undefined...

0 Likes
replied 10 years ago

Rearranging JSON output

Can I do that with my current class setup? Still new to Laravel and "proper" PHP coding, b...

0 Likes
replied 10 years ago

Eloquent not inserting null values on pivot table

Some further googling found two threads (one, two), but using DB::raw("NULL") gave the sam...

0 Likes
replied 10 years ago

Rearranging JSON output

One small update - I didn't like initializing Fractal in the constructor, so I added this method to...

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.

© 2024 Laravel.io - All rights reserved.