Sunday, January 11, 2015

Laravel : How to add helper function


Initially laravel have no helper.php file to add global user defined function. But we need to add some global function to make easy our development.

So today we will discus on this topics, "How to add helper function to laravel project".

First of all create a file named helper.php under app/ directory. Then write some function in the helper.php file. Now open global.php file from app/start directory. And add the following code at the bottom of the file.


require app_path().'/helpers.php';


Now helper.php file is added to your project. and enjoy. For any question please comment on the comment box.

2 comments :

  1. Thanks a lot for sharing this amazing knowledge with us. This site is fantastic. I always find great knowledge from it. Hire Laravel Developer

    ReplyDelete
  2. Nice Post! This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. Thanks a million and please keep up the effective work Thank yo so much for sharing this kind of info- hire laravel developer

    ReplyDelete

 

Copyright @ 2014 Tech Tutorial .