D
D
Dmitry Sonko2015-04-09 18:33:15
Laravel
Dmitry Sonko, 2015-04-09 18:33:15

Laravel 4.2, SoftDeletingTrait what's wrong?

In version 4.1, a property of the model was used. In 4.2, traits were added, but what a misfortune. When deleting, the trait works perfectly, the deleted_at field is set in the timestamp, everything is cool. But when searching, there are records with the field set, although, in theory, it should only do this when using withTrashed / onlyTrashed and hedgehogs with them. What could be wrong?
protected $softDelete = true;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Sonko, 2015-04-10
@SonkoDmitry

The problem was actually in a banal thing, an overridden constructor without calling the parent.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question