Skip to content

Instantly share code, notes, and snippets.

@rmccullagh
Last active May 24, 2019 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmccullagh/0412f57387b4f66227badceee3d96cdd to your computer and use it in GitHub Desktop.
Save rmccullagh/0412f57387b4f66227badceee3d96cdd to your computer and use it in GitHub Desktop.
<?php
namespace App\Asset;
use Illuminate\Contracts\Foundation\Application;
use App\Asset\AssetManager;
class AssetServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function register()
{
$this->app->singleton('amezmo.asset', function (Application $app) {
$config = $app->make('config')['app'];
return new AssetManager($app->basePath(), $config['debug'], $config['cdn']);
});
}
public function provides()
{
return ['amezmo.asset'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment