We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I mentioned here:
It should be introduced also on README or Wiki.
<?php namespace App\Console\Commands\IdeHelper; use Barryvdh\LaravelIdeHelper\Console\ModelsCommand as BaseModelsCommand; use Illuminate\Support\Arr; use Illuminate\Database\Eloquent\Relations\Relation; class ModelsCommand extends BaseModelsCommand { /** * @param string $relation * @param Relation $relationObj * @return bool */ protected function isRelationNullable(string $relation, Relation $relationObj): bool { $reflectionObj = new \ReflectionObject($relationObj); if (in_array($relation, ['hasOne', 'hasOneThrough', 'morphOne'], true) || !$reflectionObj->hasProperty('foreignKey')) { return parent::isRelationNullable($relation, $relationObj); } $fkProp = $reflectionObj->getProperty('foreignKey'); $fkProp->setAccessible(true); return (bool)Arr::first( (array)$fkProp->getValue($relationObj), fn (string $value) => isset($this->nullableColumns[$value]) ); } }
The text was updated successfully, but these errors were encountered:
hello
it looks like you know this subject very closely. maybe you can make a PR for it?
afaik, this is something that cannot be done on compoships but only on laravel-ide-helper, right?
Sorry, something went wrong.
Hello!
This issue has been fixed by the linked PR and can be closed
No branches or pull requests
I mentioned here:
It should be introduced also on README or Wiki.
The text was updated successfully, but these errors were encountered: