Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dartmoon-io/prestashop-config
https://github.com/dartmoon-io/prestashop-config
prestashop prestashop-library
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dartmoon-io/prestashop-config
- Owner: dartmoon-io
- License: mit
- Created: 2021-12-14T22:43:32.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T13:53:10.000Z (over 1 year ago)
- Last Synced: 2024-12-14T05:47:26.000Z (9 days ago)
- Topics: prestashop, prestashop-library
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prestashop Config
Ever dreamed of a Laravel-like config folder for your PrestaShop module where you can put you module's static configs? Well this package has got you covered!## Installation
1. Install the package
```bash
composer require dartmoon/prestashop-config
```2. Create a folder named `config` in the root of your module.
## Usage
You can now organize your configs inside the `config` folder of your module as follows.
E.g. Let's create a config file named `ftp.config` inside the `config` folder with the following content.
```php
'localhost',
'port' => 21,
'user' => 'pippo'
'password' => 'pluto'
];
```Inside your module you can retrieve the config values as follows
```php
use Dartmoon\Config\Facades\Config;// Without a default value
$host = Config::get('ftp.host');// Using a default value
$port = Config::get('ftp.port', 21);
```## License
This project is licensed under the MIT License - see the LICENSE.md file for details