Best practices for custom helpers on Laravel 5

Posted 3 years ago by calebeoliveira

Hi, I would like to create some helpers (functions) to avoid repeating code between some views, in L5 style:

Formated text: {{ fooFormatText($text) }}

They are basically text formatting functions. Where and how can I put a file with these functions?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.