I'm using laravel and i'm having some problems that I'm not quite sure what is the best way to do.
I have in my views
Folder a file with the line:
{{ $user->permissionName() }}
The function permissionName()
gets the User's $permission_id
property and then it returns the name of the permission.
The problem is that I shouldn't get data from the model. I need to write this function on the Repository
file. but now I have a new problem...
How do I get this function to the view
file?
I rely on the fact that the data on mvc should be like:
Model > Repository > Controller > View
or am I wrong?