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

dai.mike16723
dai.mike16723

Recently, I was writing a query, It supposed to write where condition in an array

ReservationModel::whereStatus_idAndCreated_at(1,Carbon::now()->subMinutes(1)->toDateTimeString())->delete();

but it just didn't works

However, this works

ReservationModel::where('created_at','<',Carbon::now()->subMinutes(1)->toDateTimeString())->where('status_id', 1)->delete();

So I start thinking that is this is a old version that we are currently using?

Thanks

Mike

strk
strk

whereStatus_idAndCreated_at, that is something unseen in eloquent

Laravel 5.1

Last updated

cleanse_
cleanse_

You can run php artisan --version in your console. You should see Laravel Framework version 5.1.46 (LTS)

u2rajendra30806
u2rajendra30806

Laravel Framework 5.5.40

laszlo.zenware.io

1-5 of 5

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