Support the ongoing development of Laravel.io →
Views Forms Architecture
Last updated 2 years ago.
0

What about a controller witch is returning the correct view and then somewhere in your main controller just. For me its normal to use the controller. It's do some logic and returns a right view for this. What if later you will decide to make a button not a link? Or add some design elements to this link.?

$add_button = App::make('PartialsController')->getAddButton( $item_id );
Last updated 9 years ago.
0

Disclaimer: Having recently start working at a company where we only develop in Laravel, I've sort of had to learn things quickly, so someone please correct me if I'm wrong.

My suggestion would be to handle this with a request to run the validation for you and handle the rest in a command + handler. Alternatively, you could do it all in one command, running the auth before a function is allowed to run in the handler. This might just be me though, abstracting everything to this extent.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

iamjessu iamjessu Joined 19 Mar 2014

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.

© 2024 Laravel.io - All rights reserved.