laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.57k stars 334 forks source link

Non-static method exception using scout:import #388

Closed jim0thy closed 5 years ago

jim0thy commented 5 years ago

Description:

Calling scout:import "App\Model" causes the error:

Non-static method App\Model::usesSoftDelete() should not be called statically

The stack trace points to line 122 in Searchable.php:

$softDelete = static::usesSoftDelete() && config('scout.soft_delete', false);

This happens on all Searchable models across several projects, regardless of whether the model uses the SoftDeletes trait.

Steps To Reproduce:

Run php artisan scout:import "App\Model"

jim0thy commented 5 years ago

Ignore this, I'm an idiot.

shortcodes commented 4 years ago

Ignore this, I'm an idiot.

@jim0thy I am curious. Why i am an idiot too? Maybe some feedback for me's in future, and present?

shortcodes commented 4 years ago

Ok. I know why i am idiot. In my Engine i had non static method usesSoftDelete. Nothing to do with this package. It is greaT ;)