laravel-ide-helper
laravel-ide-helper copied to clipboard
Describe property without @comment
Summary
The helper works only with @comment. But it doesn't work without comment. I would use it without comment.
class Users extends Model
{
/**
* Get User's full name.
*
* @return string
*/
public function getFullNameAttribute(): string
{
return $this->first_name . ' ' .$this->last_name;
}
/**
* Get User's short name.
* Returns only first name.
*
* Ignore this description.
*
* @return string
*/
public function getShortNameAttribute(): string
{
return $this->first_name;
}
}
// => after generate models
/**
* App\Models\Users
*
* @property-read string $full_name Get User's full name.
* @property-read string $short_name Get User's short name.
* …
*/