Reputation: 4499
for an example I have an Eloquent modal named 'Student'
$student = Student::first();
we can add PHP doc comment to this variable like this.
/**
* @var Student $student
*/
$student = Student::first();
in Eloquent modals we can set new attributes at the runtime
$student->setAttribute('is_a_good_boy', true);
now, is there a way to add this dynamic property to the phpDOc?
Upvotes: 2
Views: 1962