When I make a new migration and add ->nullable() or $table->foreign(...)->references(..) phpStorm couldn't find those methods. Is it happening only to me?
"barryvdh/laravel-ide-helper": "^2.2",
"doctrine/dbal": "^2.5"
Nevermind, Adding this code to _ide_helper.php in the end solved the problem:
namespace Illuminate\Support{
/**
* @method Fluent first()
* @method Fluent after($column)
* @method Fluent change()
* @method Fluent nullable()
* @method Fluent unsigned()
* @method Fluent unique()
* @method Fluent index()
* @method Fluent primary()
* @method Fluent default($value)
* @method Fluent onUpdate($value)
* @method Fluent onDelete($value)
* @method Fluent references($value)
* @method Fluent on($value)
*/
class Fluent {}
}
Did you do this manually?
I'd love to have those ->nullable() etc autocomplete methods available to me, but they never are! Would love to fix that.
Yea, place it at the bottom of the _ide_helper file. don't forget that if you generate a fresh _ide_helper.php file, it'll be reset.
@barryvdh Can this be added to the _ide_helper.php generator?
Most helpful comment
Nevermind, Adding this code to
_ide_helper.phpin the end solved the problem: