Package Data | |
---|---|
Maintainer Username: | melisplatform |
Maintainer Contact: | contact@melistechnology.com (Melis Technology) |
Package Create Date: | 2019-08-13 |
Package Last Update: | 2023-05-24 |
Language: | PHP |
License: | OSL-3.0 |
Last Refreshed: | 2024-12-15 15:21:31 |
Package Statistics | |
---|---|
Total Downloads: | 183 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 7 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This module brings the Lumen microframework inside melis platform and has a ServiceProvider to access all Melis services.
These instructions will guide you to run the lumen microframework inside melis platform.
This module requires melisplatform/melis-core and laravel/lumen-framework in order to have this module running. This will automatically be done when using composer.
composer require melisplatform/melis-platform-framework-lumen
To use the service provider , just add the line below in the \bootstrap\app.php file in "Register Service Providers" area.
$app->register(\MelisPlatformFrameworkLumen\Providers\ZendServiceProvider::class)
You can also use the class MelisServiceProvder anywhere in the app in getting melis services.
Here's an example of direct calling of a Model from melis-core inside a lumen controller.
$melisCoreLangTable = app('ZendServiceManager)->get('MelisCoreTableLang');
$resultArray = $mesliCoreLangTable->fetchAll()->toArray();
Example of using the class MelisServiceProvider
use MelisPlatformFrameworkLumen\MelisServiceProvider;
$melisServiceProvider = new MelisServiceProvider();
$melisCoreLangTable = $melisServiceProvider->getService('MelisCoreTableLang');
$resultArray = $melisCoreLangTable->fetchAll()->toArray();
Addtional info :
In getting a melis service/table, just look for module.config.php in every melisplatform module. Look for service_manager key, you can use array keys under aliases or under factories.
Example : MelisCoreTableLang
You can find the file location according to its current value.
Example : MelisCoreTableLang => 'MelisCore\Model\Tables\MelisLangTable'
File location : melis-core/src/Model/Tables/MelisLangTable.php , in here you can see all the available functions.