Skip to content

Instantly share code, notes, and snippets.

@EmmanuelObua
Last active August 26, 2022 13:12
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 EmmanuelObua/3e3268bbe71ec2d9e2cf9790aaf35cb3 to your computer and use it in GitHub Desktop.
Save EmmanuelObua/3e3268bbe71ec2d9e2cf9790aaf35cb3 to your computer and use it in GitHub Desktop.
<?php
namespace LdTalent\Pwa;
use Illuminate\Support\ServiceProvider;
use LdTalent\Pwa\Commands\PublishPwaAssets;
class PwaServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
/** Here we are restricting the instantiation of a class to a single object.
* This is useful when only one object is required across the entire system
*/
$this->app->singleton('pwa-laravel:publish', function ($app) {
return new PublishPwaAssets();
});
/** Add the list of commands registered into the commands array for
* access in the artisan console.
* */
$this->commands([
'pwa-laravel:publish',
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment