1. Go to this page and download the library: Download upon/mlang library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// ...
use Upon\Mlang\Models\MlangModel;
class Category extends MlangModel
{
// ...
php artisan mlang:generate
/** Replace {model} with the desired model you need
* (e.g., category or in subdirectory dir\\Category).
* This using the default model path [App\\Models]
* you can update the model path in the config file.
*/
php artisan mlang:generate {model}
/**
* all to run all models or specify one model name (e.g., Sub\\Category).
* Replace {locale} with the desired language code (e.g., en for English).
*/
php artisan mlang:generate {model|all} {locale}
/**
* Replace {locale} with the desired language code (e.g., en for English).
* Replace {table} with the desired table name (e.g., categories).
*/
php artisan mlang:remove {table} {locale}