Moted's avatar

UML 2 and Laravel 5.1.x - Class Diagram help

Hello everyone,

I tried out Laravel with help of laracasts and I must say its pretty awesome. Thanks for all the help from Jeffrey Ways and the community it self. In general, I wanted try to implement one project at one organization that currently uses other CMS and different tools to manage projects. So to easier up the job, I wanted to join all the projects in single "CMS".

At my current institute we have Web application development class, where we can create one web project and requisistes are to design the system with UML tools. We must use class diagram and sequence diagram, which im pretty new too.

So my doubt is, how do i do it with laravel magic behind the scenes. I know that to get user email is something like Auth::user()->email and I will get it. But in UML i must define functions inside classes to set / get or something like it. So my doubt is, should I do it like in screenshot below or I need to add some existing dependency from laravel and extends my Users class or there is a better solution along the way.

Screenshot: https://gyazo.com/6789df2400b9ed0d8a78cd9efea4b857

0 likes
2 replies
Erik's avatar

Aren't you supposed to have different packages(no idea how to call them) where in you define the different parts of the system? For e.g:

You have a domain layer which contains your entities (users, roles, teams, etc.) and logic layer where you have your controllers?

Just a question.

1 like
Moted's avatar

You have diagrams, which can represent certain packages of the system. Each package can contain multiple diagrams, im still total noob to this part. Trying to do some research on it. But yes, I do have this separtion. In model I have the relationships between entities only. I also have Web Modeling Relationships and I dont know but I will ask how to implement controller layer at course with class diagrams with MVC structure. i just created from scratch this example to try to show my doubt, how to show where are this methods Auth::user()->email are coming from. How to show that they are coming from laravel framework mainly. Becouse the methods and variables, which are in this Users class, aren't making any sense to me (or anyone i guess) using the laravel framework.

With that said, I wanted to model it the way that any person by opening it, understands thats Users class is connected with Eloquent and Facades or anything like it.

Please or to participate in this conversation.