Skip to content

Commit

Permalink
Pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvenga committed Jul 6, 2023
1 parent 02d2423 commit 0eb046c
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions README.md
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.

0 comments on commit 0eb046c

Please sign in to comment.