src/ServiceProvider.php
public function boot()
    {
        $this->publishes([
            __DIR__.'/../config/config.php' => config_path('frontend-assets.php'),
        ]);

        blade::directive('captureScript', function ($name) {
            $name = empty($name) ? 'inline' : substr(str_replace('$', '', $name), 1, -1);

            return "<?php FrontendAsset::addScript(ob_get_clean(), '".$name."'); ?>";
        });

        blade::directive('captureStyle', function ($name) {
            $name = empty($name) ? 'header' : substr(str_replace('$', '', $name), 1, -1);

            return "<?php FrontendAsset::addStyle(ob_get_clean(), '".$name."'); ?>";
        });

        blade::directive('resources', function ($name) {
            $name = trim($name, "'\"");
            $name = "'$name'";

            return "<?php FrontendAsset::controller(['js', 'css'], $name); ?>";
        });

        blade::directive('asset', function ($name) {
            if (strlen(trim($name, "'\"[]")) == strlen($name)) {
                $name = "'$name'";
            }

            return "<?php FrontendAsset::container($name); ?>";
        });
    }
public function boot()
    {
        $this->publishes([
            __DIR__.'/../config/config.php' => config_path('frontend-assets.php'),
        ]);

        blade::directive('captureScript', function ($name) {
            $name = empty($name) ? 'inline' : substr(str_replace('$', '', $name), 1, -1);

            return "<?php FrontendAsset::addScript(ob_get_clean(), '".$name."'); ?>";
        });

        blade::directive('captureStyle', function ($name) {
            $name = empty($name) ? 'header' : substr(str_replace('$', '', $name), 1, -1);

            return "<?php FrontendAsset::addStyle(ob_get_clean(), '".$name."'); ?>";
        });

        blade::directive('resources', function ($name) {
            $name = trim($name, "'\"");
            $name = "'$name'";

            return "<?php FrontendAsset::controller(['js', 'css'], $name); ?>";
        });

        blade::directive('asset', function ($name) {
            if (strlen(trim($name, "'\"[]")) == strlen($name)) {
                $name = "'$name'";
            }

            return "<?php FrontendAsset::container($name); ?>";
        });
    }
Bootstrap the application events.

@return void