|
@@ -8,6 +8,7 @@ use Dcat\Admin\Exception\RuntimeException;
|
|
|
use Dcat\Admin\Form;
|
|
|
use Dcat\Admin\Grid;
|
|
|
use Dcat\Admin\Show;
|
|
|
+use Dcat\Laravel\Database\SoftDeletes as DcatSoftDeletes;
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
use Illuminate\Database\Eloquent\Model as EloquentModel;
|
|
|
use Illuminate\Database\Eloquent\Relations;
|
|
@@ -80,8 +81,11 @@ class EloquentRepository extends Repository implements TreeRepository
|
|
|
|
|
|
$this->setKeyName($this->model()->getKeyName());
|
|
|
|
|
|
+ $traits = class_uses($this->model());
|
|
|
+
|
|
|
$this->setIsSoftDeletes(
|
|
|
- in_array(SoftDeletes::class, class_uses($this->model()))
|
|
|
+ in_array(SoftDeletes::class, $traits, true)
|
|
|
+ || in_array(DcatSoftDeletes::class, $traits, true)
|
|
|
);
|
|
|
}
|
|
|
|