lpuddu / laravel-translations-dashboard
A panel for managing database translations in Laravel.
Requires
- php: ^7.4
- ext-intl: *
- ext-json: *
- spatie/laravel-permission: ^3.11
- waavi/translation: 2.4.x
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~5
- phpunit/phpunit: ^8.4
- sempro/phpunit-pretty-print: ^1.0
- v4.4.0
- v4.3.1
- v4.3.0
- v4.2.0
- v4.1.1
- v4.1.0
- v4.0.1
- v4.0.0
- v3.1.1
- v3.1.0
- v3.0.0
- v2.0.1
- v2.0.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- dev-master / 1.0.x-dev
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/npm_and_yarn/frontend/select2-4.0.6
- dev-dependabot/npm_and_yarn/frontend/minimist-1.2.6
- dev-dependabot/npm_and_yarn/frontend/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/frontend/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/frontend/path-parse-1.0.7
- dev-dependabot/composer/laravel/framework-7.30.4
This package is auto-updated.
Last update: 2022-12-06 21:12:15 UTC
README
Note: as new Laravel version keep coming out, this package is not actively mantained anymore. It might receive bug fixes, but won't be kept up to date.
Laravel Translations Dashboard
This package is a full-featured translations dashboard for laravel 5.7+.
You will have a ready-to-use dashboard to manage multilingual translation keys, to be loaded in your website with the Laravel native helpers (__()
, trans()
and @lang()
).
The package combines the best features of two popular packages, namely spatie\laravel-permission and Waavi/translation.
Installation
Via Composer
composer require lpuddu/laravel-translations-dashboard
Usage
Once installed, publish assets folder, migrations and config files by running:
php artisan translations-dashboard:init
You can also customize the views by publishing them:
php artisan vendor:publish --provider="LPuddu\LaravelTranslationsDashboard\LaravelTranslationsDashboardServiceProvider" --tag="laravel-translations-dashboard.views"
When published, the config/laravel-translations-dashboard.php config file contains:
return [ /** * The prefix applied to all the routes, eg. /translations/home */ 'prefix' => 'translations', /** * The route used to logout translators */ 'logout_route' => 'translations/logout', /** * The guard to use for permissions */ 'guard' => 'web', /** * The list of middlewares that all routes should use. * You can use this to authenticate users into the dashboard via the appropriate middleware. */ 'middlewares' => ['web', 'auth'] ];
Remove your config cache:
php artisan config:clear
Execute the database migrations:
php artisan migrate
By default, the package adds four permissions (manage-languages
, manage-pages
, manage-settings
, translate
).
Without permissions, you will only be able to login into the dashboard without doing much.
Make sure that your user has a HasRoles
trait, then add the relevant permissions to start working.
$user->givePermissionTo('translate', 'manage-pages');
The change will be reflected immediately on your database. Check the spatie\laravel-permission documentation to explore more possibilities.
Security
If you discover any security related issues, please use the issue tracker on github or email me at info__at__lucapuddu.com
Credits
License
MIT. Please see the license file for more information.