This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Asinox
Asinox

Hello guys, i wonder if there is a way to copy/duplicate records like Laravel does?

I tried, but this feature is not implemented

BadMethodCallException' with message 'Call to undefined method October\Rain\Database\QueryBuilder::replicate()' 

Thank you!

daftspunky
daftspunky

The replicate method exists, perhaps you use it incorrectly. Please provide the code you have executed that produces this error.

Last updated

Asinox
Asinox

Thanks for you reply @daftspunk, im trying something like this:

$payment = Payment::where("id",$orden)->where("user_id","=", $user->id)->firstOrFail();
            $logs = PaymentLog::where("master_id",$payment->id)->replicate();

or


$payment = Payment::where("id",$orden)->where("user_id","=", $user->id)->firstOrFail();
            $logs = $payment->paymentlog()->replicate();

Any idea?

Thank you

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.