PHP code example of hassanzohdy / mongez

1. Go to this page and download the library: Download hassanzohdy/mongez 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/ */

    

hassanzohdy / mongez example snippets


 
use HZ\Illuminate\Mongez\Translation\Traits\Translatable;

class MyClass 
{
  use Translatable;

  public function index()
  {
    $this->transUsers('users.name'); // will translate from `Users` module and `users` file and the keyword is `name
    $this->transUsers('usersGroups.permissions'); // will translate from `Users` module and `usersGroups` file and the keyword is `permissions
  }
}