I'm getting this error with ide-helper v2.6.0 and v.2.5,. It was working some hours ago.

This exception is given when using PHP 7.3. I use Homestead and solved it by executing
php7.2 artisan ide-helper:models
I don't know what your situation is, but either wait for a bugfix or use PHP 7.2.
@juliuscaesarnl yes, that was the problem. I downgraded to PHP 7.2. Thank you!
@andreshg112 You're welcome! I suggest waiting with 7.3 since there are still a bunch of issues when using it with Xdebug, for example.
For me its working PHP 7.3.2 with Xdebug v2.7.0rc1 on Laravel 5.7
But same setup on Laravel 5.8 it's not working. Is there an issue with Laravel 5.8??
I got it fixed, by editing: Barryvdh\LaravelIdeHelper\Console\ModelsCommand , line 483
Before:
if (stripos($impl, $type) || stripos($impl, $type) !== false) {
After:
if ($type && (stripos($impl, (string)$type) || stripos($impl, $type) !== false)) {
Credit:
https://github.com/raknjak/CIMembership/commit/e866ee3dcc8095cb3c43f9fbe6da3c64cc0fdd4b (application/vendor/MX/Router.php changes)
Most helpful comment
This exception is given when using PHP 7.3. I use Homestead and solved it by executing
php7.2 artisan ide-helper:modelsI don't know what your situation is, but either wait for a bugfix or use PHP 7.2.