Support the ongoing development of Laravel.io →
Architecture

Hi guys, how far can I go with presenters? Would something like:

public function presentUrl() { return <a class="btn btn-default" href="{{{URL::route('news.create')}}}"><span class="glyphicon glyphicon-plus- sign"> </span>new</a> }

still okay, or is it too much?

Last updated 2 years ago.
0

It's ok to mix HTML in a presenter. Just remember to extend an abstract base presenter if you find a lot of your different presenter classes use something.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.