My relationships are remembered.

Posted 9 months ago by phpMick

This is very odd.

I have deleted all the rows from my agreements table (Agreement::all(); proves it.)

But, If I do this:


Which uses:

 public function agreements()
        return $this->hasMany(Agreement::class);

I still get the old records!

I can workaround it by not using the relationship:

        $agreements =  Agreement::where('user_group_id','=',$selectedUserGroup->id)->get();

Any idea what is going on?

Mick (going mad).

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.