generated from fidum/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// config for Fidum/LaravelTranslationLinter | ||
return [ | ||
|
||
]; |
19 changes: 19 additions & 0 deletions
19
database/migrations/create_translation_linter_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::create('laravel_translation_linter_table', function (Blueprint $table) { | ||
$table->id(); | ||
|
||
// add fields | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Fidum\LaravelTranslationLinter\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
|
||
class LaravelTranslationLinterCommand extends Command | ||
{ | ||
public $signature = 'laravel-translation-linter'; | ||
|
||
public $description = 'My command'; | ||
|
||
public function handle(): int | ||
{ | ||
$this->comment('All done'); | ||
|
||
return self::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Fidum\LaravelTranslationLinter\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
/** | ||
* @see \Fidum\LaravelTranslationLinter\LaravelTranslationLinter | ||
*/ | ||
class LaravelTranslationLinter extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Fidum\LaravelTranslationLinter\LaravelTranslationLinter::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Fidum\LaravelTranslationLinter; | ||
|
||
class LaravelTranslationLinter | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Fidum\LaravelTranslationLinter; | ||
|
||
use Spatie\LaravelPackageTools\Package; | ||
use Spatie\LaravelPackageTools\PackageServiceProvider; | ||
use Fidum\LaravelTranslationLinter\Commands\LaravelTranslationLinterCommand; | ||
|
||
class LaravelTranslationLinterServiceProvider extends PackageServiceProvider | ||
{ | ||
public function configurePackage(Package $package): void | ||
{ | ||
/* | ||
* This class is a Package Service Provider | ||
* | ||
* More info: https://github.com/spatie/laravel-package-tools | ||
*/ | ||
$package | ||
->name('laravel-translation-linter') | ||
->hasConfigFile() | ||
->hasViews() | ||
->hasMigration('create_laravel-translation-linter_table') | ||
->hasCommand(LaravelTranslationLinterCommand::class); | ||
} | ||
} |