Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What are the best practices and best places for laravel 4 helpers or basic functions?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 105
    Comment on it

    Many user will make a helper in app folder but if you want to use helper the best practice and best place to use Laravel 4.x helper in app/libraries folder.

    So all the basic function and helper we should define in app/libraries.

    Advantage of libraries:

    1) By using this we can easily re-use that function whenever we need to use.

    2) It will save time and code writing.

    3) It will be used in the whole project, just define the helper name

    Example:

    $result=KarmaHelper::addData(pass parameter)
    

    By this we can use helper in a good way.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: