How to make a helper file in laravel?



How to make a helper file in laravel?..

Answer / Raghvendra Voyoharia

To create a helper function in Laravel, you can create a file in app/Helpers directory and define your functions there. Make sure to run 'composer dump-autoload' after creating the file. Here is an example: <?php nfunction myHelperFunction() {n // Your code heren}n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How to enable/disable maintenance mode in laravel 5?

1 Answers  


What are the three service provider types?

1 Answers  


What is auth api laravel?

1 Answers  


Explain the bindings and singletons properties?

1 Answers  


How to register a service provider in laravel?

1 Answers  


why we use Laravel - Session ?

2 Answers  


How can someone turn off csrf protection for a specific route?

1 Answers  


How do I register an artisan command?

1 Answers  


What is routing and how, and what are the different ways to write it?

1 Answers  


How to pass multiple variables by controller to blade file?

1 Answers  


How to pass csrf token with ajax request?

1 Answers  


Differce between contracts and facades?

1 Answers  


Categories