3 => Modelling The Applications Data
Before attempting to do any development work it will be helpful to understand the requirements of the application in terms of the data it will need to function. This blog entry will provide an overview of how the data are planned to be organised. Creating The Models Now that the datas layout and relationships have been defined I can continue forward, figuring out how Eloquent ORM models work. First I have got to set my relationships in my model, to do this we use one of the built in Eloquent ORM methods. The type of relationship will dictate which function is used. All of my models boilerplate code was generated using the following Artisan command. The -c flag at the end creates a controller for the model as well, reducing the amount of code I am required to write when it comes to managing the controllers logic. User Relationships Each user can have multiple boards Each user can have one custom avatar ( if not the default is used ) Board Relationships Each board must belong to one...