Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/visual-ideas/moonshine-laravel-translations
Manage Laravel translation files with MoonShine admin panel
https://github.com/visual-ideas/moonshine-laravel-translations
eloquent gui laravel laravel-package localization moonshine multilingual php translation vi visualideas
Last synced: 2 days ago
JSON representation
Manage Laravel translation files with MoonShine admin panel
- Host: GitHub
- URL: https://github.com/visual-ideas/moonshine-laravel-translations
- Owner: visual-ideas
- License: mit
- Created: 2023-07-05T17:06:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-27T08:51:32.000Z (about 1 year ago)
- Last Synced: 2023-11-28T22:06:15.203Z (12 months ago)
- Topics: eloquent, gui, laravel, laravel-package, localization, moonshine, multilingual, php, translation, vi, visualideas
- Language: PHP
- Homepage: https://github.com/visual-ideas/moonshine-laravel-translations
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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/moonshine-laravel-translations)
[![Total Downloads](https://img.shields.io/packagist/dt/visual-ideas/moonshine-laravel-translations.svg?style=flat-square)](https://packagist.org/packages/visual-ideas/moonshine-laravel-translations)## 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.