Answer the question
In order to leave comments, you need to log in
How to set laravel model property through annotations?
было
class UserInfo
{
/**
*
* @var string
* @Column(type="string", length=4, nullable=false)
*/
public $discipline = Discipline::ENG;
....
}
сейчас переписываю на другой фреймворк через аннотации
теперь работает так, выглядит более читаемо
/**
* Class UserInfo
....
* @property string $Discipline
....
*/
class StudentInfo extends MysqlApiModel
{
....
}
как задать длину поля модели и значение по умолчанию через аннотации ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question