Skip to content

sararzbn/Translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Translation

This package allows you to manage your website translation via admin. You can create a new language, Keys and values, then publish it and write it in language files.

Installation

composer require root_rzbn/translation

Laravel 7 uses Package Auto-Discovery, so you are not required to add ServiceProvider manually.

Laravel 7+

If you don't use Auto-Discovery, add the ServiceProvider to the providers array in config/app.php file

   root_rzbn\translate\TranslatorServiceProvider::class,

Default Filters Namespace

The default namespace for all filters is App\EloquentFilters\ with the base name of the Model.

For example:

Suppose we have a User model with an AgeMoreThan filter.As a result, the namespace filter must be as follows:

With Config file

You can optionally publish the config file with:

php artisan vendor:publish --provider="root_rzbn\translate\ServiceProvider" --tag="config"

And set the namespace for your model filters which will reside in:

return [
    /*
     |--------------------------------------------------------------------------
     | Eloquent Filter Settings
     |--------------------------------------------------------------------------
     |
     | This is the namespace all you Eloquent Model Filters will reside
     |
     */
    'namespace' => 'root_rzbn\\translate\\',
];

Usage

.....

Publish styles

php artisan vendor:publish --provider="root_rzbn\translate\ServiceProvider" --tag="assets"

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email srouzbahani35@gmail.com instead of using the issue tracker.

License

translation is released under the MIT License. See the bundled LICENSE file for details.

Built with ❤️ for you.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published