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 );
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community