Skip to content

Commit

Permalink
Add example command and serviceprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-ea committed Mar 14, 2019
1 parent 9bc2995 commit 568346f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/Commands/CheckTranslationCoverage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Minutemailer\Lang\Commands;

use Illuminate\Console\Command;

class CheckTranslationCoverage extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'language:coverage {language?}';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Checks coverage of all or single language';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info('Hello world');
}
}
22 changes: 22 additions & 0 deletions src/Providers/LaravelLangServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Minutemailer\Lang\Providers;

use Illuminate\Support\ServiceProvider;

class LaravelLangServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
if ($this->app->runningInConsole()) {
$this->commands([
\Minutemailer\Lang\Commands\CheckTranslationCoverage::class,
]);
}
}
}

0 comments on commit 568346f

Please sign in to comment.