It would be great to add automatic support for get and set methods using magic __call method in the relations trait.
This way you'll only have to add @method docblocks in the class definiation of your entity/model to have code completion support in your IDE from interaction with your models.
/**
* @method Role getRole()
* @method void setRole(Role $role)
*/
class User
{
use Relations;
public function role(): One
{
return $this->belongsToOne(Role::class);
}
}
It would be great to add automatic support for get and set methods using magic __call method in the relations trait.
This way you'll only have to add @method docblocks in the class definiation of your entity/model to have code completion support in your IDE from interaction with your models.