A panel for managing database translations in Laravel.
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 (
composer require lpuddu/laravel-translations-dashboard
Once installed, publish the required files (assets folder and dependencies migrations) by running
php artisan translations-dashboard:init
You can also customize the views and the config, by changing the tag when you publish (use
config as tags)
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 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 (
translate) and two roles (
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 create a user with the
admin role to start working.
To make an admin, just use
$user->assignRole('admin'). The change will be reflected immediately on your database. Check the spatie\laravel-permission documentation to explore more possibilities.
If you discover any security related issues, please use the issue tracker on github or email me at info__at__lucapuddu.com
MIT. Please see the license file for more information.