Answer the question
In order to leave comments, you need to log in
Functions in a view or better in a controller?
The project is growing and it turns out a lot of logic in the views.
So I think, can it be right to do all this in the controller, and pass the finished variable to the view ?
And now in the views there is a lot of such a plan:
{{ mb_ucfirst($locations->name).' - '.get_short_title($locations).env('STE_NAME') }}
$title = mb_ucfirst($locations->name).' - '.get_short_title($locations).env('STE_NAME');
Answer the question
In order to leave comments, you need to log in
My eyes...
Anywhere but in a template. There are also assessors and mutators..
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question