mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fix return type of methods provided by SoftDeletes (#1345)
* Fix return type of methods provided by `SoftDeletes` * Update CHANGELOG * fix test / update snapshot
This commit is contained in:
@@ -1208,7 +1208,7 @@ class ModelsCommand extends Command
|
||||
$traits = class_uses_recursive($model);
|
||||
if (in_array('Illuminate\\Database\\Eloquent\\SoftDeletes', $traits)) {
|
||||
$modelName = $this->getClassNameInDestinationFile($model, get_class($model));
|
||||
$builder = $this->getClassNameInDestinationFile($model, \Illuminate\Database\Query\Builder::class);
|
||||
$builder = $this->getClassNameInDestinationFile($model, \Illuminate\Database\Eloquent\Builder::class);
|
||||
$this->setMethod('withTrashed', $builder . '|' . $modelName, []);
|
||||
$this->setMethod('withoutTrashed', $builder . '|' . $modelName, []);
|
||||
$this->setMethod('onlyTrashed', $builder . '|' . $modelName, []);
|
||||
|
||||
Reference in New Issue
Block a user