Laravel: using phpDoc to write more readable code

Image with some unreadable code by Markus Spiske on Unsplash

Available database columns

/**
* ...
*
* @property int id
* @property string username
* @property string email
* @property bool is_active
* @property int tenant_id A foreign key to an account
*/
class Author extends Model { ... }

Relations

@property Story[]|Collection stories

Accessors and mutators

Senior back-end developer in Ghent who likes writing sometimes weird / creative solutions to a specific problem.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store