You may have noticed the Helper class being used on Enqueue and Panels to include assets from your plugin. At first this may see a little weird compared to older versions of Herbert where you could do both:

'src' => '/js/post.js'
'src' => '//'

Now that Herbert\Framework is only loaded once even if there are multiple plugins built on Herbert active, we've had to move path and url logic to each plugin. This is where the Helper class comes in. The following is an example (seen in routes.php) use of Helper while in the root namespace of an app:


If you're not in the root namespace (for example, inside a controller), you need to add the following before calling Helper::method():

use MyPlugin\Helper;
<?php namespace MyPlugin\Controllers;

use MyPlugin\Helper;

class SampleController {

    public function index()
      return Helper::assetUrl('/js/main.js');

Built in methods

Get a config variable


Gets a path to a relative file.


Gets a path to a relative asset in resources/assets


Gets a url to a relative asset in resources/assets