generated from moonshine-software/moonshine-package-template
-
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
1 changed file
with
46 additions
and
2 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 |
---|---|---|
@@ -1,6 +1,50 @@ | ||
# Spatie\MediaLibrary field for [MoonShine Laravel admin panel](https://moonshine.cutcode.dev) | ||
# Laravel translations manager for [MoonShine admin panel](https://moonshine.cutcode.dev) | ||
|
||
[![Latest Version on Packagist](https://img.shields.io/packagist/v/visual-ideas/moonshine-laravel-translations.svg?style=flat-square)](https://packagist.org/packages/visual-ideas/laravel-site-settings) | ||
[![Total Downloads](https://img.shields.io/packagist/dt/visual-ideas/moonshine-laravel-translations.svg?style=flat-square)](https://packagist.org/packages/visual-ideas/laravel-site-settings) | ||
|
||
## Documentation | ||
## Installation | ||
|
||
You can install the package via composer: | ||
|
||
```bash | ||
composer require visual-ideas/moonshine-laravel-translations | ||
``` | ||
|
||
You must run the migrations with: | ||
|
||
```bash | ||
php artisan migrate | ||
``` | ||
|
||
You can publish the config file with: | ||
|
||
```bash | ||
php artisan vendor:publish --provider="VI\MoonShineLaravelTranslations\Providers\MoonShineLaravelTranslationsServiceProvider" --tag="config" | ||
``` | ||
|
||
|
||
This is the contents of the published config file: | ||
|
||
```php | ||
TODO Config info | ||
``` | ||
|
||
Add new MoonShine resource to your MoonShineServiceProvider file, like this: | ||
|
||
```php | ||
MenuItem::make('Переводы', new \VI\MoonShineLaravelTranslations\Resources\MoonShineLaravelTranslationResource()) | ||
->translatable() | ||
->badge(fn()=>cache()->remember('moonshine_laravel_translations_changed_count', | ||
now()->addMinute(), | ||
fn()=>\VI\MoonShineLaravelTranslations\Models\MoonshineLaravelTranslation::getCountChanged())) | ||
->icon('heroicons.outline.language'), | ||
``` | ||
|
||
## Credits | ||
|
||
- [Alex](https://github.com/alexvenga) | ||
|
||
## License | ||
|
||
The MIT License (MIT). Please see [License File](LICENSE) for more information. |