1. Go to this page and download the library: Download alnaggar/mujam 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/ */
// Retrieves the store structure as an associative array with namespaces as the top-level keys, locales as the second-level keys, and groups as the third-level values.
$storeStructure = Mujam::store('php')->getStructure();
// Fetches the translation from the enabled stores.
$welcomeMessage = __('messages.welcome');
// Package translations continue to work as expected.
$packageTranslation = __('packageNamespace::group.item');
// Inside AppServiceProvider
public function boot()
{
Mujam::extend(
driver: 'customDriverName',
resolver: function ($app, $config) {
// return the custom store instance.
}
);
}