3

I am new in laravel and I have good experience in Cakephp. In Cakephp we use helper for views only But I have seen my exiting code in laravel, We use helpers in controller also. Is it fine to use helper in controller or not?

If yes then Please let me know, What is the disadvantage or advantage of using helpers in controllers?

Please suggest me...

1 Answer 1

5

If you're talking about global Laravel helpers, then yes, you can use them everywhere in your app (controllers, models, view, middleware, routes.php etc), because these are global helpers.

You can also define your own helpers which will also be available globally.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.