tschallacka / storm-database
The WinterCMS Storm library but only the database features
Requires
- illuminate/cache: ^8.0
- illuminate/database: ^8.38
- illuminate/encryption: ^8.38
- illuminate/events: ^8.38
- illuminate/filesystem: ^8.0
- illuminate/hashing: ^8.0
- illuminate/log: ^8.61
- illuminate/queue: ^8.0
- illuminate/redis: ^8.0
- illuminate/translation: ^8.38
- illuminate/validation: ^8.38
- laravel-zero/foundation: ^8.55
- symfony/http-foundation: ^5.1.4
- symfony/mime: ^5.2
- vlucas/phpdotenv: ^2.6
Requires (Dev)
- meyfa/phpunit-assert-gd: ^3.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-03-17 03:11:06 UTC
README
This is a individual fork of the Storm Library for WinterCMS that adds solely the database features and removes the rest of the features that that library offers.
This way you can have a lean library for snazzy database models in independent projects, without needing all the other wintercms dependent features that the storm library offers.
For documentation refer to [https://wintercms.com/docs/database/model]
To test this library run composer test.
If you wish to contribute consider contributing to the winter storm library.
Currently this uses a branch for migrating to laravel 8 in a newer version, but this will follow the main branch when laravel 8 integration is achieved.
Installation
composer require tschallacka/storm-database
Usage
Somewhere in your application boot up or at the location where you wish to use it, you'll most likely need to initialize the Eloquent connection manager. You can use something like the snippet below.
$db_conf = require('path/to/config/database.php'); $manager = new \Winter\Storm\Database\Capsule\Manager(); foreach($db_conf as $name => $config) { $manager->addConnection($config, $name); } $manager->bootEloquent();
Use the WinterCMS documentation to see which configuration details are accepted, or review the Laravel documentation
Contributing
Run the command composer update-from-source to update the files from the source.
Currently it pulls from my private branch on https://github.com/tschallacka/storm/tree/remove_helper_calls
Feel free to modify bin/sync.sh to suit your needs.
Libraries using this to inject Eloquent in non Eloquent frameworks
Magento
Mage Storm Registers as a plugin within Magento 2.4 and then reads the app/etc/env.php file to glean the communication details so easy Eloquent access is possible within Magento 2.4