Software Alternatives & Reviews

How to Create Your Own Helper Functions in Laravel

Laravel Composer
  1. A PHP Framework For Web Artisans
    Pricing:
    • Open Source
    Helper functions can be extremely useful in your Laravel projects. They can help to simplify your code in your projects in a clean and easy way. Laravel comes with many helper functions out-the-box such as dd(), abort() and session(). But as your projects start to grow, you'll likely find that you'll want to add your own.

    #Developer Tools #Web Frameworks #PHP Framework 194 social mentions

  2. Composer is a tool for dependency management in PHP.
    Pricing:
    • Open Source
    Now that we've created our helper file, we need to register it so that we can use our new function. To do this, we can update our composer.json file so that our file is loaded at runtime on each request and is available for using. This is possible because Laravel includes the Composer class loader in the public/index.php file.

    #Development Tools #Javascript UI Libraries #JavaScript Framework 124 social mentions

Discuss: How to Create Your Own Helper Functions in Laravel

Log in or Post with