Download the PHP package mphpmaster/laravel-model-translation-helpers without Composer
On this page you can find all versions of the php package mphpmaster/laravel-model-translation-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mphpmaster/laravel-model-translation-helpers
More information about mphpmaster/laravel-model-translation-helpers
Files in mphpmaster/laravel-model-translation-helpers
Download mphpmaster/laravel-model-translation-helpers
More information about mphpmaster/laravel-model-translation-helpers
Files in mphpmaster/laravel-model-translation-helpers
Vendor mphpmaster
Package laravel-model-translation-helpers
Short Description Laravel model translation helpers.
License MIT
Package laravel-model-translation-helpers
Short Description Laravel model translation helpers.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-model-translation-helpers
Laravel model translation helpers
Dependencies:
- php >=8.1 REQUIRED IN YOUR PROJECT
- laravel >=8 REQUIRED IN YOUR PROJECT
- laravel/helpers ^1.5 composer will install it automatically
Installation:
Usage:
-
Add trait to your model class (REQUIRED):
-
Override this method if the model has custom translation filename (OPTIONAL):
-
Create Translation file (REQUIRED):
- Translation file must be under
models
folder in order to use it with this helper. - Name the file as you defined it with
getTranslationKey
method on step 2, by default the filename must be like model name in snake case.
Example:
If you use defaultgetTranslationKey
method it will be for modelUser
asuser.php
.
- Translation file must be under
-
Default translation file will be like:
- Use the helper anywhere:
License
The Laravel framework is open-sourced software licensed under the MIT license.
This Helpers is open-sourced software licensed under the MIT license.
All versions of laravel-model-translation-helpers with dependencies
PHP Build Version
Package Version
The package mphpmaster/laravel-model-translation-helpers contains the following files
Loading the files please wait ....